fr.umlv.botbattle
Enum BombAction

java.lang.Object
  extended by java.lang.Enum<BombAction>
      extended by 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 :

  1. BOMB_DROPPED : the bomb was dropped on the arena at the current bot position
  2. 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)

Nested Class Summary
static class BombAction.BombResponse
          values returned by a call BotContext.nextTurn(DROP_BOMB)
 
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.
 
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

DROP_BOMB

public static final BombAction DROP_BOMB
action to drop a bomb.

Method Detail

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