Module it.polimi.ingsw.am13
Class MsgCommandCreateRoom
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.MsgCommandCreateRoom
- All Implemented Interfaces:
Serializable
Command message which is sent to create a room
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMsgCommandCreateRoom
(String chosenNickname, Token token, int players) Creates the message by setting the attributes to the parameters -
Method Summary
-
Field Details
-
chosenNickname
The nickname the client wants to create the room with. Specified here because we don't know if it is a valid one! -
token
The chosen token color. Can't be invalid. -
players
private final int playersThe room capacity.
-
-
Constructor Details
-
MsgCommandCreateRoom
Creates the message by setting the attributes to the parameters- Parameters:
chosenNickname
- the nickname of the client who wants to create a roomtoken
- the color token chosen by the player who wants to create a roomplayers
- the capacity (number of players) of the room
-
-
Method Details
-
getChosenNickname
- Returns:
- the nickname the client wants to create the room with
-
getPlayers
public int getPlayers()- Returns:
- the capacity of the room
-
getToken
- Returns:
- the color token of the player who wants to create the room
-