Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion RobotPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,14 @@ public static RobotType chooseRobotType() {
}
return RobotType.GUARD;
}


/**
* Returns the number of robots within a given radius squared
* @param type the type of robot to look for
* @param radiusSqr the squared radius
* @param team the team the robot should be on
* @return the number of robots nearby
*/
public static int numberOfRobotsInRadius(RobotType type,int radiusSqr,Team team){
int count = 0;
RobotInfo[] robats = rc.senseNearbyRobots(radiusSqr,team);
Expand Down