Class RobotInfo

java.lang.Object
battlecode.common.RobotInfo

public class RobotInfo extends Object
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 Details

    • ID

      public final int ID
      The unique ID of the robot.
    • team

      public final Team team
      The Team that the robot is on.
    • type

      public final UnitType type
      The type of the robot.
    • health

      public final int health
      The health of the robot.
    • location

      public final MapLocation location
      The current location of the robot.
    • paintAmount

      public final int paintAmount
      The 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

      public Team 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

      public MapLocation getLocation()
      Returns the location of this robot.
      Returns:
      the location of this robot
    • getType

      public UnitType 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object