battlecode.common
public enum RobotType extends Enum<RobotType>
| Enum Constant and Description |
|---|
HQ |
NOISETOWER |
PASTR |
SOLDIER |
| Modifier and Type | Field and Description |
|---|---|
double |
attackAngle
Not used for 2014 (all angles allowable by default).
|
double |
attackCosHalfTheta |
int |
attackDelay
Action delay due to attacks.
|
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.
|
int |
captureTurns
How many turns it takes to build this building.
|
int |
count
Amount the robot counts towards the total robot count.
|
boolean |
isBuilding
Whether the robot must be built.
|
RobotLevel |
level
The robot's level.
|
double |
maxHealth
The maximum amount of health the robot can have.
|
double |
sensorAngle
Not used for 2014 (all angles allowable by default).
|
double |
sensorCosHalfTheta |
int |
sensorRadiusSquared
The square of the maximum distance that the robot can sense.
|
double |
splashPower
Splash damage of attack.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final RobotType HQ
public static final RobotType SOLDIER
public static final RobotType NOISETOWER
public static final RobotType PASTR
public final RobotLevel level
public final double maxHealth
public final int sensorRadiusSquared
public final double sensorAngle
public final int attackRadiusMaxSquared
public final int attackRadiusMinSquared
public final double attackAngle
public final int attackDelay
public final double attackPower
public final boolean canAttack
public final double sensorCosHalfTheta
public final double attackCosHalfTheta
public final boolean isBuilding
public final double splashPower
public final int count
public final int captureTurns
public static RobotType[] values()
for (RobotType c : RobotType.values()) System.out.println(c);
public static RobotType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic boolean canAttack(RobotLevel level)