public enum GameState extends Enum<GameState>
GameState
is an enumeration type that defines the current status of a game.
The GameState
is implemented as it is defined in the interface document v1.0
but contains additional information that was not defined in the interface document.Enum Constant and Description |
---|
NOT_RUNNING
The game is not running anymore (finished).
|
NOT_STARTED
The game has not started jet.
|
PAUSED
The game is paused.
|
RUNNING
The game is still going.
|
Modifier and Type | Method and Description |
---|---|
static GameState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GameState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GameState NOT_STARTED
public static final GameState RUNNING
public static final GameState PAUSED
public static final GameState NOT_RUNNING
public static GameState[] values()
for (GameState c : GameState.values()) System.out.println(c);
public static GameState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2017 smarTen. All rights reserved.