core
Enum GameOver
java.lang.Object
java.lang.Enum<GameOver>
core.GameOver
- All Implemented Interfaces:
- Serializable, Comparable<GameOver>
public enum GameOver
- extends Enum<GameOver>
An enum with a user readable message about what why someone won. Also used to
output the reason to the schema.
CHECKMATE
public static final GameOver CHECKMATE
PIECES_LOST
public static final GameOver PIECES_LOST
TIME_EXPIRED
public static final GameOver TIME_EXPIRED
NONE
public static final GameOver NONE
values
public static final GameOver[] 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(GameOver c : GameOver.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static GameOver 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
toString
public String toString()
- Overrides:
toString
in class Enum<GameOver>
- Returns:
- a string representation of the enum (useful for the xml schema)
humanReadableString
public String humanReadableString()
- Returns:
- a human readable string representation of the enum (useful for
messages to the user)