JavaScript is disabled on your browser.
Enum Constant Summary
Enum Constants
Client close application.
Client has been successfully registered on server.
End game on client, because opponent leaved game.
Get TOP (param) game sessions results.
Passing new generated brick as parameter.
Starts game sessions on clients.
Send when client wants to start new game with "name" argument.
Results of top 10 game sessions.
Waiting for opponent end game session.
Waiting for new game start.
Method Summary
All Methods Static Methods Concrete Methods
Build command by provided type and
String
represented arguments.
Retrieves arguments from commands based on their type (internal number of arguments).
Get command type by
String
representation of type.
Returns the enum constant of this class with the specified name.
Returns an array containing the constants of this enum class, in
the order they are declared.
Methods inherited from class java.lang.Enum
clone , compareTo , describeConstable , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf
Enum Constant Details
STARTING_GAME
Send when client wants to start new game with "name" argument.
GET_NEXT_BRICK
Prompt for new brick.
LEAVE_GAME
Client ending game.
CLIENT_DISCONNECTED
Client close application.
GET_TOP
Get TOP (param) game sessions results.
CONNECTED
Client has been successfully registered on server.
WAITING_FOR_NEW_GAME
Waiting for new game start.
START_GAME
Starts game sessions on clients.
NEXT_BRICK
Passing new generated brick as parameter.
WAITING_FOR_END_GAME
Waiting for opponent end game session.
END_GAME
End game on clients.
END_GAME_OPPONENT_LEAVE
public static final CommandsAPI END_GAME_OPPONENT_LEAVE
End game on client, because opponent leaved game.
SERVER_DISCONNECTED
Server is shut down. All clients should stop crash the games sessions.
TOP_RESULTS
Results of top 10 game sessions.
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 name
NullPointerException
- if the argument is null
getArguments
Retrieves arguments from commands based on their type (internal number of arguments).
Parameters:
command
- CommandsAPI
command type.
input
- String representation of command with arguments.
IMPORTANT: Input string SHOULD contain command name.
Returns:
List of String represented arguments
Throws:
IllegalArgumentException
- If number of argument is lower than required by CommandsAPI
type.
buildCommand
Build command by provided type and
String
represented arguments.
Parameters:
command
- CommandsAPI
command type.
parameters
- String
represented arguments
Returns:
String
mounted command.
Throws:
IllegalArgumentException
- if number of provided arguments mismatching with internal metadata.