|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<ErrorState>
gameLogic.ErrorState
public enum ErrorState
ErrorState is used to check if a Brain has been doing something bad the last turn. NO_ERROR means that there have not been any error. If an error occurs, the bot will continue to move in the same direction as it did in the turn before.
GameState
Enum Constant Summary | |
---|---|
EXCEPTION
Means that the Brain threw an exception to the game engine. |
|
INVALID_MOVE
Means that the Brain tries to make an invalid move. |
|
NO_ERROR
NO_ERROR means that all is well. |
|
TOO_SLOW
Means that the Brain is taking too long time to think. |
Method Summary | |
---|---|
java.lang.String |
toString()
Converts the enum label into a human readable string, describing the error. |
static ErrorState |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static ErrorState[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ErrorState NO_ERROR
public static final ErrorState TOO_SLOW
public static final ErrorState INVALID_MOVE
public static final ErrorState EXCEPTION
Method Detail |
---|
public static ErrorState[] values()
for (ErrorState c : ErrorState.values()) System.out.println(c);
public static ErrorState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<ErrorState>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |