Package it.polimi.ingsw.Server
Enum Class LobbyServer.State
- All Implemented Interfaces:
Serializable
,Comparable<LobbyServer.State>
,Constable
- Enclosing class:
LobbyServer
Represents the various stages of the connection between client and server
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionclient has not identified itself yetclient is now in a game, playingclient is part of a lobby, waiting for the game to startclient now has a name, but is not part of a lobby -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LobbyServer.State
Returns the enum constant of this class with the specified name.static LobbyServer.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ACCEPT_PHASE
client has not identified itself yet -
REDIRECT_PHASE
client now has a name, but is not part of a lobby -
GAME_START_PHASE
client is part of a lobby, waiting for the game to start -
GAME_IN_PROGRESS_PHASE
client is now in a game, playing
-
-
Constructor Details
-
State
private State()
-
-
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
-