break;
}
}
} else if (gm instanceof SellTowerRoundMessage) {
SellTowerRoundMessage strm = (SellTowerRoundMessage) gm;
Tower sellTower;
// find the tower we want to sell
for (Tower tower : towers) {
if (tower.getId() == strm.getTowerId() && tower.isReady()) {
sellTower = tower;
sellTower.setSellTime((int) (strm.getRoundId() - roundId));
sellTower.setSelling(true);
break;
}
}
System.out.println(strm.getRoundId() - roundId);
} else if (gm instanceof BuildCreepRoundMessage) {
BuildCreepRoundMessage bcrm = (BuildCreepRoundMessage) gm;
Creep c = CreepFactory.createCreep(this, IConstants.Creeps.valueOf(
IConstants.Creeps.class, bcrm.getCreepType()));