Package battlecode.common
Class RobotInfo
java.lang.Object
battlecode.common.RobotInfo
RobotInfo stores basic information that was 'sensed' of another Robot. This
info is ephemeral and there is no guarantee any of it will remain the same
between rounds.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe health of the robot.final intThe unique ID of the robot.final MapLocationThe current location of the robot.final intThe current paint amount of the robot.final TeamThe Team that the robot is on.final UnitTypeThe type of the robot. -
Constructor Summary
ConstructorsConstructorDescriptionRobotInfo(int ID, Team team, UnitType type, int health, MapLocation location, int paintAmount) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the health of this robot.intgetID()Returns the ID of this robot.Returns the location of this robot.intReturns the paint amount of this robot.getTeam()Returns the team that this robot is on.getType()Returns this robot's type.inthashCode()toString()
-
Field Details
-
ID
public final int IDThe unique ID of the robot. -
team
The Team that the robot is on. -
type
The type of the robot. -
health
public final int healthThe health of the robot. -
location
The current location of the robot. -
paintAmount
public final int paintAmountThe current paint amount of the robot.
-
-
Constructor Details
-
RobotInfo
public RobotInfo(int ID, Team team, UnitType type, int health, MapLocation location, int paintAmount)
-
-
Method Details
-
getID
public int getID()Returns the ID of this robot.- Returns:
- the ID of this robot
-
getTeam
Returns the team that this robot is on.- Returns:
- the team that this robot is on
-
getHealth
public int getHealth()Returns the health of this robot.- Returns:
- the health of this robot
-
getLocation
Returns the location of this robot.- Returns:
- the location of this robot
-
getType
Returns this robot's type.- Returns:
- the type of this robot.
-
getPaintAmount
public int getPaintAmount()Returns the paint amount of this robot.- Returns:
- the paint amount of the robot
-
equals
-
hashCode
public int hashCode() -
toString
-