battlecode.common
Enum RobotType

java.lang.Object
  extended by java.lang.Enum<RobotType>
      extended by battlecode.common.RobotType
All Implemented Interfaces:
Serializable, Comparable<RobotType>

public enum RobotType
extends Enum<RobotType>


Enum Constant Summary
ARTILLERY
           
GENERATOR
           
HQ
           
MEDBAY
           
SHIELDS
           
SOLDIER
           
SUPPLIER
           
 
Field Summary
 double attackAngle
          The range of angles that this robot can attack.
 double attackCosHalfTheta
           
 int attackDelay
          The number of turns that it takes this robot to attack.
 double attackPower
          The amount of damage that this robot does when it attacks.
 int attackRadiusMaxSquared
          The square of the maximum distance that the robot can attack.
 int attackRadiusMinSquared
          The square of the minimum distance that the robot can attack.
 boolean canAttack
          Whether or not the robot can attack units.
 boolean isEncampment
           
 RobotLevel level
          The robot's level.
 double maxEnergon
          The maximum amount of energon the robot can have.
 double sensorAngle
          The range of angles that the robot can sense.
 double sensorCosHalfTheta
           
 int sensorRadiusSquared
          The square of the maximum distance that the robot can sense.
 
Method Summary
 boolean canAttack(RobotLevel level)
          Returns true if the robot can attack robots at the given level.
static RobotType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RobotType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HQ

public static final RobotType HQ
Type: HQ
Max Energon: 500
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 0
Attack Power: 0.0
Attack Delay: 0

SOLDIER

public static final RobotType SOLDIER
Type: Soldier
Max Energon: 40
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 2
Attack Power: 6.0
Attack Delay: 1

MEDBAY

public static final RobotType MEDBAY
Type: Encampment Upgrade
Max Energon: 100
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 2
Attack Power: 2.0
Attack Delay: 1

SHIELDS

public static final RobotType SHIELDS
Type: Encampment Upgrade
Max Energon: 100
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 2
Attack Power: 10.0
Attack Delay: 1

ARTILLERY

public static final RobotType ARTILLERY
Type: Encampment Upgrade
Max Energon: 100
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 63
Attack Power: 60.0
Attack Delay: 20

GENERATOR

public static final RobotType GENERATOR
Type: Encampment Upgrade
Max Energon: 100
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 0
Attack Power: 0.0
Attack Delay: 0

SUPPLIER

public static final RobotType SUPPLIER
Type: Encampment Upgrade
Max Energon: 100
Sensor Radius Squared: 14
Min Attack Radius Squared: 0
Max Attack Radius Squared: 0
Attack Power: 0.0
Attack Delay: 0
Field Detail

level

public final RobotLevel level
The robot's level.


maxEnergon

public final double maxEnergon
The maximum amount of energon the robot can have.


sensorRadiusSquared

public final int sensorRadiusSquared
The square of the maximum distance that the robot can sense.


sensorAngle

public final double sensorAngle
The range of angles that the robot can sense.


attackRadiusMaxSquared

public final int attackRadiusMaxSquared
The square of the maximum distance that the robot can attack.


attackRadiusMinSquared

public final int attackRadiusMinSquared
The square of the minimum distance that the robot can attack.


attackAngle

public final double attackAngle
The range of angles that this robot can attack.


attackDelay

public final int attackDelay
The number of turns that it takes this robot to attack.


attackPower

public final double attackPower
The amount of damage that this robot does when it attacks.


canAttack

public final boolean canAttack
Whether or not the robot can attack units.


sensorCosHalfTheta

public final double sensorCosHalfTheta

attackCosHalfTheta

public final double attackCosHalfTheta

isEncampment

public final boolean isEncampment
Method Detail

values

public static RobotType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RobotType c : RobotType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RobotType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

canAttack

public boolean canAttack(RobotLevel level)
Returns true if the robot can attack robots at the given level.