All Implemented Interfaces:
Serializable

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

    • chosenNickname

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

      private final Token token
      The chosen token color.
    • gameId

      private final int gameId
      The id of the game that the client wants to join
  • Constructor Details

    • MsgCommandJoinRoom

      public MsgCommandJoinRoom(String chosenNickname, Token token, int gameId)
      Creates the message by setting the attributes to the parameters
      Parameters:
      chosenNickname - the nickname the client wants to join the room with
      token - chosen by the player who wants to join the room
      gameId - of the game that the client wants to join
  • Method Details

    • getChosenNickname

      public String getChosenNickname()
      Returns:
      the nickname the client wants to join the room with
    • getToken

      public Token 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