From 275d2f2b1b0704f8d4d9587234f5c705778f0e81 Mon Sep 17 00:00:00 2001 From: vilasopher Date: Wed, 6 Jan 2016 21:08:20 -0500 Subject: [PATCH] Update RobotPlayer.java --- RobotPlayer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/RobotPlayer.java b/RobotPlayer.java index 986efc6..d82415e 100644 --- a/RobotPlayer.java +++ b/RobotPlayer.java @@ -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);