|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<RobotType>
battlecode.common.RobotType
public 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 |
---|
public static final RobotType HQ
public static final RobotType SOLDIER
public static final RobotType MEDBAY
public static final RobotType SHIELDS
public static final RobotType ARTILLERY
public static final RobotType GENERATOR
public static final RobotType SUPPLIER
Field Detail |
---|
public final RobotLevel level
public final double maxEnergon
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 isEncampment
Method Detail |
---|
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 name
NullPointerException
- if the argument is nullpublic boolean canAttack(RobotLevel level)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |