Class MsgResponseUpdateGameState

All Implemented Interfaces:
Serializable

public class MsgResponseUpdateGameState extends MsgResponse
Response message which is sent to the player who just reconnected to an already started match, containing the game state
See Also:
  • Field Details

    • gameState

      private final GameState gameState
      The updated game state
    • player

      private final PlayerLobby player
      Player who wants to reconnect to an already started match
  • Constructor Details

    • MsgResponseUpdateGameState

      public MsgResponseUpdateGameState(GameModelIF gameModel, PlayerLobby player)
      Builds a new response message with the given game state
      Parameters:
      gameModel - the game model
      player - the player who wants to reconnect
  • Method Details

    • getGameState

      public GameState getGameState()
      Returns:
      the game state at the moment the player reconnected
    • getPlayer

      public PlayerLobby getPlayer()
      Returns:
      the player who reconnected