fr.umlv.botbattle
Enum BombAction
java.lang.Object
java.lang.Enum<BombAction>
fr.umlv.botbattle.BombAction
- All Implemented Interfaces:
- BotContext.Action<BombAction.BombResponse>, Serializable, Comparable<BombAction>
public enum BombAction
- extends Enum<BombAction>
- implements BotContext.Action<BombAction.BombResponse>
Bomb action.
The only possible action is to drop a bomb.
There are two possible responses :
- BOMB_DROPPED : the bomb was dropped on the arena
at the current bot position
- NO_MORE_BOMB : if all bombs available for the current bot
are already in the arena.
see
BombInfo.getMaxBombs().
The bot needs to wait until some bomb exploded.
- Version:
- 1.0
- Author:
- remi
- See Also:
BotContext.nextTurn(BotContext.Action)
|
Enum Constant Summary |
DROP_BOMB
action to drop a bomb. |
|
Method Summary |
static BombAction |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static BombAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they're declared. |
DROP_BOMB
public static final BombAction DROP_BOMB
- action to drop a bomb.
values
public static final BombAction[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(BombAction c : BombAction.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static BombAction 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