public enum KickState extends Enum<KickState>
KickState
is an enumeration type that defines why a player was kicked from the game (implies losing) or if the player is still in the game.
The KickState
contains all values from KickReason
as it is defined in the interface document v1.1 but adds the IN_GAME
value.Enum Constant and Description |
---|
CONNECTION_LOST
The
CONNECTION_LOST case is used, if the client lost it's connection to the server. |
DEFAULT
The
DEFAULT case is used, if there is no better KickReason than this one. |
IN_GAME
The
IN_GAME case is used while the client is still participating in the game and was not kicked. |
INVALID_GATE
The
INVALID_GATE case is used, if client placed the token on an invalid Gate . |
INVALID_REQUEST
The
INVALID_REQUEST case is used, if the client send an invalid massage. |
INVALID_TILE
The
INVALID_TILE case is used, if the client passed an invalid tileID. |
INVALID_TILE_POSITION
The
INVALID_TILE_POSITION case is used, if the client passed an invalid tile position. |
TILE_NOT_OWNED
The
TILE_NOT_OWNED case is used, if the client passed a tileId of a tile which not belongs to the player. |
TIMEOUT
The
TIMEOUT case is used, if the client did not respond in time. |
Modifier and Type | Method and Description |
---|---|
static KickState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static KickState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KickState DEFAULT
DEFAULT
case is used, if there is no better KickReason
than this one.public static final KickState INVALID_TILE
INVALID_TILE
case is used, if the client passed an invalid tileID.public static final KickState TILE_NOT_OWNED
TILE_NOT_OWNED
case is used, if the client passed a tileId of a tile which not belongs to the player.public static final KickState TIMEOUT
TIMEOUT
case is used, if the client did not respond in time.public static final KickState INVALID_GATE
INVALID_GATE
case is used, if client placed the token on an invalid Gate
.public static final KickState INVALID_REQUEST
INVALID_REQUEST
case is used, if the client send an invalid massage.public static final KickState INVALID_TILE_POSITION
INVALID_TILE_POSITION
case is used, if the client passed an invalid tile position.public static final KickState CONNECTION_LOST
CONNECTION_LOST
case is used, if the client lost it's connection to the server.public static final KickState IN_GAME
IN_GAME
case is used while the client is still participating in the game and was not kicked.public static KickState[] values()
for (KickState c : KickState.values()) System.out.println(c);
public static KickState 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.