Module it.polimi.ingsw.am13
Class MsgCommandJoinRoom
java.lang.Object
it.polimi.ingsw.am13.network.socket.message.Message
it.polimi.ingsw.am13.network.socket.message.command.MsgCommand
it.polimi.ingsw.am13.network.socket.message.command.MsgCommandJoinRoom
- All Implemented Interfaces:
Serializable
Command message which is sent to join a room
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgCommandJoinRoom
(String chosenNickname, Token token, int gameId) Creates the message by setting the attributes to the parameters -
Method Summary
-
Field Details
-
chosenNickname
The nickname the client wants to join the room with. Specified here because we don't know if it is a valid one! -
token
The chosen token color. -
gameId
private final int gameIdThe id of the game that the client wants to join
-
-
Constructor Details
-
MsgCommandJoinRoom
Creates the message by setting the attributes to the parameters- Parameters:
chosenNickname
- the nickname the client wants to join the room withtoken
- chosen by the player who wants to join the roomgameId
- of the game that the client wants to join
-
-
Method Details
-
getChosenNickname
- Returns:
- the nickname the client wants to join the room with
-
getToken
- Returns:
- the color token chosen by the player who wants to join the room
-
getGameId
public int getGameId()- Returns:
- the id of the game that the client wants to join
-