All Implemented Interfaces:
Serializable

public class MsgCommandCreateRoom extends MsgCommand implements Serializable
Command message which is sent to create a room
See Also:
  • Field Details

    • chosenNickname

      private final String 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

      private final Token token
      The chosen token color. Can't be invalid.
    • players

      private final int players
      The room capacity.
  • Constructor Details

    • MsgCommandCreateRoom

      public MsgCommandCreateRoom(String chosenNickname, Token token, int players)
      Creates the message by setting the attributes to the parameters
      Parameters:
      chosenNickname - the nickname of the client who wants to create a room
      token - the color token chosen by the player who wants to create a room
      players - the capacity (number of players) of the room
  • Method Details

    • getChosenNickname

      public String getChosenNickname()
      Returns:
      the nickname the client wants to create the room with
    • getPlayers

      public int getPlayers()
      Returns:
      the capacity of the room
    • getToken

      public Token getToken()
      Returns:
      the color token of the player who wants to create the room