|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Enum
robocode.control.snapshot.BulletState
public final class BulletState
Defines a bullet state, where the robot can be: just fired, moving somewhere, hitting a victim, hitting another bullet, hitting the wall, exploded, or inactive when it done an inactivated.
Field Summary | |
---|---|
static BulletState |
EXPLODED
The bullet currently represents a robot explosion, i.e. a robot death. |
static BulletState |
FIRED
The bullet has just been fired this second and hence just been created. |
static BulletState |
HIT_BULLET
The bullet has hit another bullet. |
static BulletState |
HIT_VICTIM
The bullet has hit a robot victim. |
static BulletState |
HIT_WALL
The bullet has the wall, i.e. one of the four borders. |
static BulletState |
INACTIVE
The bullet is currently inactive. |
static BulletState |
MOVING
The bullet is now moving across the battlefield, but has not hit anything so far. |
Method Summary | |
---|---|
int |
getValue()
Returns the state as an integer value. |
static BulletState |
toState(int value)
Returns a BulletState based on an integer value that represents a BulletState. |
static BulletState |
valueOf(String name)
|
static BulletState[] |
values()
|
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final BulletState FIRED
public static final BulletState MOVING
public static final BulletState HIT_VICTIM
public static final BulletState HIT_BULLET
public static final BulletState HIT_WALL
public static final BulletState EXPLODED
public static final BulletState INACTIVE
Method Detail |
---|
public static final BulletState[] values()
public static BulletState valueOf(String name)
public int getValue()
BulletState.toState(int)
public static BulletState toState(int value)
value
- the integer value that represents a specific BulletState.
IllegalArgumentException
- if the specified value does not correspond
to a BulletState and hence is invalid.BulletState.getValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |