fr.umlv.botbattle
Enum ArenaAction

java.lang.Object
  extended by java.lang.Enum<ArenaAction>
      extended by fr.umlv.botbattle.ArenaAction
All Implemented Interfaces:
BotContext.Action<ArenaItem>, Serializable, Comparable<ArenaAction>

public enum ArenaAction
extends Enum<ArenaAction>
implements BotContext.Action<ArenaItem>

Bot movements in the Arena. All enum values can be used to indicate a movement using BotContext.nextTurn(action). The possible return values are enum values of ArenaItem.

Version:
1.0
Author:
remi
See Also:
BotContext.nextTurn(BotContext.Action)

Enum Constant Summary
DOWN
          ask the game to move the bot down.
LEFT
          ask the game to move the bot left.
RIGHT
          ask the game to move the bot right.
UP
          ask the game to move the bot up.
 
Method Summary
static ArenaAction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ArenaAction[] 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

UP

public static final ArenaAction UP
ask the game to move the bot up.


DOWN

public static final ArenaAction DOWN
ask the game to move the bot down.


LEFT

public static final ArenaAction LEFT
ask the game to move the bot left.


RIGHT

public static final ArenaAction RIGHT
ask the game to move the bot right.

Method Detail

values

public static final ArenaAction[] 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(ArenaAction c : ArenaAction.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ArenaAction 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