| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrobocraft.player.GameObject
robocraft.player.Robot
reference to Robot GameObject. Typically, this will be a reference to another Robot in the world that you encounter in your travels, but you also, as you implement AbstractRobotPlayer, will have a reference to self, which be be the Robot that your RobotPlayer is controlling. All of the accessor methods should succeed when called on self.
| Method Summary | |
 boolean | 
canAttackSquare(MapLocation loc)
Return whether a given location is within this robot's ATTACK range, given its current position and direction.  | 
 boolean | 
canMove(Direction dir)
Returns whether this robot can move in the the specified direction, IF it were facing in that direction.  | 
 boolean | 
canSenseObject(GameObject obj)
Return whether a given GameObject is within this robot's SENSOR range, given its current position and direction.  | 
 boolean | 
canSenseSquare(MapLocation loc)
Return whether a given location is within this robot's SENSOR range, given its current position and direction.  | 
 ActionType | 
getCurrentAction()
Returns current action this robot is engaged in, or ActionType.IDLE if robot is not active.  | 
 Direction | 
getDirection()
Returns current direction this robot is facing.  | 
 double | 
getEnergonLevel()
Returns current energon level of this robot.  | 
 int | 
getRoundsUntilIdle()
Returns the number of rounds until isActive() will return false.  | 
 RobotType | 
getRType()
Returns the type of robot this is.  | 
 boolean | 
isActive()
Returns whether this robot is active or not.  | 
| Methods inherited from class robocraft.player.GameObject | 
equals, getID, getLocation, getTeam, getType, hashCode, toString | 
| Methods inherited from class java.lang.Object | 
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Method Detail | 
public RobotType getRType()
public double getEnergonLevel()
                       throws GameActionException
GameActionException - if this robot doesn't exist anymore
 or is out of sensor range.
public boolean isActive()
                 throws GameActionException
GameActionException - if this robot doesn't exist anymore
 or is out of sensor range.
public ActionType getCurrentAction()
                            throws GameActionException
GameActionException - if this robot doesn't exist anymore
 or is out of sensor range.
public Direction getDirection()
                       throws GameActionException
GameActionException - if this robot doesn't exist anymore
 or is out of sensor range.
public int getRoundsUntilIdle()
                       throws GameActionException
GameActionException - if this robot doesn't exist anymore
 or is out of sensor range.
public boolean canMove(Direction dir)
                throws GameActionException
dir - the hypothetical direction of movement
GameActionException - if this robot doesn't exist anymore
 or is out of sensor range
public boolean canSenseSquare(MapLocation loc)
                       throws GameActionException
loc - the MapLocation being tested.
GameActionException - if this robot does not exist
 anymore, or if this robot is out of your sensor range.
public boolean canSenseObject(GameObject obj)
                       throws GameActionException
obj - the GameObject to test
obj does not exist or is out of your sensor range
GameActionException - if this robot does not exist
 anymore, or is out of your sensor range.
public boolean canAttackSquare(MapLocation loc)
                        throws GameActionException
loc - the MapLocation being tested.
GameActionException - if this robot does not exist
 anymore, or if this robot is out of your sensor range.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||