Package pacManReloaded.common
Enum Command
- java.lang.Object
-
- java.lang.Enum<Command>
-
- pacManReloaded.common.Command
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTOR_POSITION
BEGIN_FAILED
beginnt failed commandBEGIN_GAME
begin game request commandCHANGE_DIRECTION
CLIENT_INFO
client info commandCLOSE
close commandGAME_FINISHED
game finished commandGAMESTATE
GET_CLIENT_INFO
Client Info request commandGET_HIGHSCORE
highscore request commandGET_LOBBY_INFO
Lobby info request commandGET_MANUAL
manual request commandGET_NICKNAME
gets the Nickname of Client or Server.HIGHSCORE
Highscore commandINIT_GAMESTATE
INIT_PLAYER
JOIN_LOBBY
join lobby request commandJOIN_LOBBY_RESPONSE
join lobby response commandLOBBY_INFO
lobby info commandMANUAL
manual commandMAP
map commandMESSAGE
Broadcast messages to all clients in the Lobby.MY_NICKNAME
The Nickname of the Sender will be send.PING
Sent to check connection. pong sent if check successful.PONG
Connection check successful.REMOVE_OBJECT
SEND_TO_ADDRESS
Parameters: Username of receiver and messages separated by :.SET_NICKNAME
The Nickname will be changed.UNKNOWN_MESSAGE
if the protocol messages has not one of the mentioned prefixes from above, the prefix UNKNOWN_MESSAGE is returned.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Command
getEnum(java.lang.String value)
"getter" for the Command-enumjava.lang.String
toString()
static Command
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Command[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MESSAGE
public static final Command MESSAGE
Broadcast messages to all clients in the Lobby.
-
SEND_TO_ADDRESS
public static final Command SEND_TO_ADDRESS
Parameters: Username of receiver and messages separated by :. Redirect the messages to the specific client.
-
CLOSE
public static final Command CLOSE
close command
-
HIGHSCORE
public static final Command HIGHSCORE
Highscore command
-
GET_HIGHSCORE
public static final Command GET_HIGHSCORE
highscore request command
-
GET_LOBBY_INFO
public static final Command GET_LOBBY_INFO
Lobby info request command
-
LOBBY_INFO
public static final Command LOBBY_INFO
lobby info command
-
MAP
public static final Command MAP
map command
-
GET_CLIENT_INFO
public static final Command GET_CLIENT_INFO
Client Info request command
-
CLIENT_INFO
public static final Command CLIENT_INFO
client info command
-
GET_MANUAL
public static final Command GET_MANUAL
manual request command
-
MANUAL
public static final Command MANUAL
manual command
-
PING
public static final Command PING
Sent to check connection. pong sent if check successful.
-
PONG
public static final Command PONG
Connection check successful.
-
GET_NICKNAME
public static final Command GET_NICKNAME
gets the Nickname of Client or Server.
-
MY_NICKNAME
public static final Command MY_NICKNAME
The Nickname of the Sender will be send.
-
SET_NICKNAME
public static final Command SET_NICKNAME
The Nickname will be changed.
-
UNKNOWN_MESSAGE
public static final Command UNKNOWN_MESSAGE
if the protocol messages has not one of the mentioned prefixes from above, the prefix UNKNOWN_MESSAGE is returned.
-
BEGIN_FAILED
public static final Command BEGIN_FAILED
beginnt failed command
-
JOIN_LOBBY
public static final Command JOIN_LOBBY
join lobby request command
-
JOIN_LOBBY_RESPONSE
public static final Command JOIN_LOBBY_RESPONSE
join lobby response command
-
ACTOR_POSITION
public static final Command ACTOR_POSITION
-
BEGIN_GAME
public static final Command BEGIN_GAME
begin game request command
-
INIT_PLAYER
public static final Command INIT_PLAYER
-
GAMESTATE
public static final Command GAMESTATE
-
INIT_GAMESTATE
public static final Command INIT_GAMESTATE
-
CHANGE_DIRECTION
public static final Command CHANGE_DIRECTION
-
REMOVE_OBJECT
public static final Command REMOVE_OBJECT
-
GAME_FINISHED
public static final Command GAME_FINISHED
game finished command
-
-
Method Detail
-
values
public static Command[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Command c : Command.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Command valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getEnum
public static Command getEnum(java.lang.String value)
"getter" for the Command-enum- Parameters:
value
- the enum as string- Returns:
- the resulting enum
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<Command>
-
-