Skip to content

Commit 6b43bab

Browse files
committed
prevent null robot sensing
1 parent 9456f82 commit 6b43bab

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

engine/src/main/battlecode/world/RobotControllerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,7 @@ public RobotInfo senseRobotAtLocation(MapLocation loc) throws GameActionExceptio
556556
@Override
557557
public boolean canSenseRobot(int id) {
558558
InternalRobot sensedRobot = getRobotByID(id);
559-
Boolean isFlying = sensedRobot.isBeingThrown();
560-
return sensedRobot != null && !isFlying && canSenseLocation(sensedRobot.getLocation());
559+
return sensedRobot != null && !sensedRobot.isBeingThrown() && canSenseLocation(sensedRobot.getLocation());
561560
}
562561

563562
@Override

0 commit comments

Comments
 (0)