battlecode.common
Class RobotInfo

java.lang.Object
  extended by battlecode.common.RobotInfo

public class RobotInfo
extends Object

Struct that 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
 Direction direction
          The direction this Robot is facing.
 double energon
          The energon of this Robot.
 MapLocation location
          The location of this Robot.
 boolean regen
          true if this robot is scheduled to regenerate at the beginning of its next turn.
 Robot robot
          The robot that was sensed.
 int roundsUntilAttackIdle
           
 int roundsUntilMovementIdle
           
 double shields
          The shields of this Robot.
 Team team
          The team of this Robot.
 RobotType type
          The type of this Robot.
 
Constructor Summary
RobotInfo(Robot robot, MapLocation location, double hitpoints, double shields, Direction direction, RobotType type, Team team, boolean regen, int roundsUntilAttackIdle, int roundsUntilMovementIdle)
           
 
Method Summary
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

robot

public final Robot robot
The robot that was sensed.


location

public final MapLocation location
The location of this Robot.


energon

public final double energon
The energon of this Robot.


shields

public final double shields
The shields of this Robot.


direction

public final Direction direction
The direction this Robot is facing.


type

public final RobotType type
The type of this Robot.


team

public final Team team
The team of this Robot.


regen

public boolean regen
true if this robot is scheduled to regenerate at the beginning of its next turn.


roundsUntilAttackIdle

public final int roundsUntilAttackIdle

roundsUntilMovementIdle

public final int roundsUntilMovementIdle
Constructor Detail

RobotInfo

public RobotInfo(Robot robot,
                 MapLocation location,
                 double hitpoints,
                 double shields,
                 Direction direction,
                 RobotType type,
                 Team team,
                 boolean regen,
                 int roundsUntilAttackIdle,
                 int roundsUntilMovementIdle)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object