battlecode.common
Enum GameActionExceptionType

java.lang.Object
  extended by java.lang.Enum<GameActionExceptionType>
      extended by battlecode.common.GameActionExceptionType
All Implemented Interfaces:
Serializable, Comparable<GameActionExceptionType>

public enum GameActionExceptionType
extends Enum<GameActionExceptionType>

Enumerates the possible errors in GameWorld interactions that cause a GameActionException to be thrown.


Enum Constant Summary
ALREADY_ACTIVE
          Indicates when a robot tries to execute an action, but is not currently idle
CANT_MOVE_THERE
          Indicates when a robot tries to move into non-empty square
CANT_SENSE_THAT
          Indicates when a robot tries to sense a GameObject that is no longer existant or no longer in this robot's sensor range
INTERNAL_ERROR
          Internal error in the GameWorld engine.
NO_ROBOT_THERE
          Indicates when a robot tries to perform an action on another robot, but there is no suitable robot there.
NOT_ENOUGH_FLUX
          Indicates when a robot tries to perform an action (e.g.
OUT_OF_RANGE
          Indicates when a robot tries to perform an action on a location that is outside its range.
 
Method Summary
static GameActionExceptionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GameActionExceptionType[] values()
          Returns an array containing the constants of this enum type, in the order they are 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

INTERNAL_ERROR

public static final GameActionExceptionType INTERNAL_ERROR
Internal error in the GameWorld engine. This is bad.


NOT_ENOUGH_FLUX

public static final GameActionExceptionType NOT_ENOUGH_FLUX
Indicates when a robot tries to perform an action (e.g. transfer flux, spawn) for which it does not have enough flux


CANT_MOVE_THERE

public static final GameActionExceptionType CANT_MOVE_THERE
Indicates when a robot tries to move into non-empty square


ALREADY_ACTIVE

public static final GameActionExceptionType ALREADY_ACTIVE
Indicates when a robot tries to execute an action, but is not currently idle


CANT_SENSE_THAT

public static final GameActionExceptionType CANT_SENSE_THAT
Indicates when a robot tries to sense a GameObject that is no longer existant or no longer in this robot's sensor range


OUT_OF_RANGE

public static final GameActionExceptionType OUT_OF_RANGE
Indicates when a robot tries to perform an action on a location that is outside its range.


NO_ROBOT_THERE

public static final GameActionExceptionType NO_ROBOT_THERE
Indicates when a robot tries to perform an action on another robot, but there is no suitable robot there.

Method Detail

values

public static GameActionExceptionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GameActionExceptionType c : GameActionExceptionType.values())
    System.out.println(c);

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

valueOf

public static GameActionExceptionType 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
NullPointerException - if the argument is null