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
ARCHON
           
DISRUPTER
           
SCORCHER
           
SCOUT
           
SOLDIER
           
TOWER
           
 
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 canAttackAir
          Whether or not the robot can attack air units.
 boolean canAttackGround
          Whether or not the robot can attack ground units.
 RobotLevel level
          The robot's level.
 double maxEnergon
          The maximum amount of energon the robot can have.
 double maxFlux
          The maximum amount of flux the robot can have.
 double moveCost
          The cost in flux to move the robot one square.
 int moveDelayDiagonal
          The number of turns it takes the robot to move diagonally.
 int moveDelayOrthogonal
          The number of turns it takes the robot to move orthogonally.
 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.
 double spawnCost
          The amount of flux needed to spawn the robot.
 
Method Summary
 boolean canAttack(RobotLevel level)
          Returns true if the robot can attack robots at the given level.
 boolean isAirborne()
          Returns true if this robot's level is RobotLevel.IN_AIR.
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

ARCHON

public static final RobotType ARCHON
Level: ON_GROUND
Max Energon: 150
Max Flux: 300
Move Delay Orthogonal: 6
Move Delay Diagonal: 8
Move Cost: 0.0
Sensor Radius Squared: 36
Sensor Angle: 360

SOLDIER

public static final RobotType SOLDIER
Level: ON_GROUND
Max Energon: 40
Max Flux: 100
Spawn Cost: 120
Move Delay Orthogonal: 6
Move Delay Diagonal: 8
Move Cost: 0.4
Sensor Radius Squared: 10
Sensor Angle: 180
Min Attack Radius Squared: 0
Max Attack Radius Squared: 5
Attack Angle: 90
Attack Power: 6.0
Attack Delay: 5
Attacks: Air, Ground

SCOUT

public static final RobotType SCOUT
Level: IN_AIR
Max Energon: 20
Max Flux: 50
Spawn Cost: 80
Move Delay Orthogonal: 4
Move Delay Diagonal: 6
Move Cost: 0.1
Sensor Radius Squared: 25
Sensor Angle: 360
Min Attack Radius Squared: 0
Max Attack Radius Squared: 5
Attack Angle: 360
Attack Power: 1.5
Attack Delay: 5
Attacks: Air, Ground

DISRUPTER

public static final RobotType DISRUPTER
Level: ON_GROUND
Max Energon: 70
Max Flux: 100
Spawn Cost: 180
Move Delay Orthogonal: 9
Move Delay Diagonal: 13
Move Cost: 1.2
Sensor Radius Squared: 16
Sensor Angle: 180
Min Attack Radius Squared: 0
Max Attack Radius Squared: 10
Attack Angle: 90
Attack Power: 1.7
Attack Delay: 5
Attacks: Air, Ground

SCORCHER

public static final RobotType SCORCHER
Level: ON_GROUND
Max Energon: 70
Max Flux: 100
Spawn Cost: 270
Move Delay Orthogonal: 8
Move Delay Diagonal: 11
Move Cost: 1.8
Sensor Radius Squared: 10
Sensor Angle: 135
Min Attack Radius Squared: 1
Max Attack Radius Squared: 10
Attack Angle: 180
Attack Power: 9.0
Attack Delay: 5
Attacks: Ground

TOWER

public static final RobotType TOWER
Level: ON_GROUND
Max Energon: 250
Max Flux: 0
Spawn Cost: 200
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.


maxFlux

public final double maxFlux
The maximum amount of flux the robot can have.


spawnCost

public final double spawnCost
The amount of flux needed to spawn the robot.


moveDelayOrthogonal

public final int moveDelayOrthogonal
The number of turns it takes the robot to move orthogonally.


moveDelayDiagonal

public final int moveDelayDiagonal
The number of turns it takes the robot to move diagonally. Equal to (int)Math.round(moveDelayOrthogonal*Math.sqrt(2.)).


moveCost

public final double moveCost
The cost in flux to move the robot one square.


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.


canAttackAir

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


canAttackGround

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


sensorCosHalfTheta

public final double sensorCosHalfTheta

attackCosHalfTheta

public final double attackCosHalfTheta
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.


isAirborne

public boolean isAirborne()
Returns true if this robot's level is RobotLevel.IN_AIR.