We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 001a093 commit 9a7f2b9Copy full SHA for 9a7f2b9
1 file changed
engine/src/main/battlecode/world/RobotControllerImpl.java
@@ -1031,6 +1031,9 @@ public void assertCanBecomeRatKing() throws GameActionException {
1031
int numAllyRats = 0;
1032
for (Direction d : Direction.allDirections()) {
1033
MapLocation curLoc = this.adjacentLocation(d);
1034
+ if (!this.gameWorld.getGameMap().onTheMap(curLoc))
1035
+ throw new GameActionException(CANT_DO_THAT,
1036
+ "Not enough space on map for rat to become rat king!");
1037
InternalRobot curRobot = this.gameWorld.getRobot(curLoc);
1038
if (curRobot != null && curRobot.getTeam() == this.robot.getTeam() && curRobot.getType() == UnitType.BABY_RAT) {
1039
numAllyRats += 1;
0 commit comments