fr.umlv.botbattle
Enum ArenaItem

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

public enum ArenaItem
extends Enum<ArenaItem>
implements BotContext.ActionResponse

This enumeration represents all item types of the arena. This enum is used as a response for a movement using BotContext.nextTurn(action) or to indicate visible items using the radar.

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

Enum Constant Summary
BOMB
          represents a bomb.
EMPTY
          represents an empty cell.
ENEMY_BOT
          represents a bot from another army.
FRIEND_BOT
          represents a bot from the same army that the current bot.
WALL
          represents a wall.
 
Method Summary
static ArenaItem valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ArenaItem[] 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

EMPTY

public static final ArenaItem EMPTY
represents an empty cell.


BOMB

public static final ArenaItem BOMB
represents a bomb.


WALL

public static final ArenaItem WALL
represents a wall.


ENEMY_BOT

public static final ArenaItem ENEMY_BOT
represents a bot from another army.


FRIEND_BOT

public static final ArenaItem FRIEND_BOT
represents a bot from the same army that the current bot.

Method Detail

values

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

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

valueOf

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