We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 024c428 commit 29d31b9Copy full SHA for 29d31b9
1 file changed
engine/src/main/battlecode/world/RobotControllerImpl.java
@@ -610,6 +610,9 @@ private void assertCanUpgradeTower(MapLocation loc) throws GameActionException{
610
assertCanActLocation(loc, GameConstants.BUILD_TOWER_RADIUS_SQUARED);
611
InternalRobot robot = this.gameWorld.getRobot(loc);
612
613
+ if (robot == null){
614
+ throw new GameActionException(CANT_DO_THAT, "There is no robot at the location");
615
+ }
616
if (!this.robot.getType().isTowerType()){
617
throw new GameActionException(CANT_DO_THAT, "No tower at the location");
618
}
0 commit comments