if (g == null)
return false;
if ((g.isFree()) && (!g.isOccupied()) && (tower != null) && (!context.isDead())) {
if (context.getCredits() >= tower.getPrice()) {
BuildTowerMessage btm = new BuildTowerMessage();
btm.setClientId(context.getPlayerId());
btm.setPosition(new Point(g.getLocation()[0], g.getLocation()[1]));
btm.setTowerType(tower.toString());
context.getNetwork().sendMessage(btm);
context.setCredits(context.getCredits() - tower.getPrice());
g.setOccupiedStatus(true);
return true;