core
Enum GameOver

java.lang.Object
  extended by java.lang.Enum<GameOver>
      extended by 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.


Enum Constant Summary
CHECKMATE
           
NONE
           
PIECES_LOST
           
TIME_EXPIRED
           
 
Method Summary
 String humanReadableString()
           
 String toString()
           
static GameOver valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GameOver[] 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, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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
Method Detail

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)