Package rekit.logic
Enum Class Model.GameState
- All Implemented Interfaces:
Serializable
,Comparable<Model.GameState>
,Constable
- Enclosing interface:
- Model
This enum defines the different states of the game.
- Author:
- Dominik Fuchss
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis state indicates that currently a level is shown by the game.This state indicates that currently a level is show by the game and it has ended.This state indicates that currently a level is shown by the game and it is paused.This state indicates that currently a menu is shown by the game. -
Method Summary
Modifier and TypeMethodDescriptionstatic Model.GameState
Returns the enum constant of this class with the specified name.static Model.GameState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MENU
This state indicates that currently a menu is shown by the game. -
INGAME
This state indicates that currently a level is shown by the game. -
INGAME_PAUSED
This state indicates that currently a level is shown by the game and it is paused. So a pause menu might be drawn. -
INGAME_END
This state indicates that currently a level is show by the game and it has ended. So a end menu might be drawn.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
calcState
- Parameters:
model
- the model- Returns:
- the real gamestate
-