Class EndedGame

java.lang.Object
it.polimi.ingsw.gc14.Network.NetworkEvent
it.polimi.ingsw.gc14.Network.NetworkEvents.EndedGame
All Implemented Interfaces:
Serializable

public class EndedGame extends NetworkEvent
Network event that signals the end of the game and delivers the final standings.

Only applied client-side; apply(GameController) always returns false.

See Also:
  • Constructor Details

    • EndedGame

      public EndedGame(Map<Slot,Player> slotPlayerMap, OrderLogicCard orderLogicCard, CurrentState currentState, ArrayList<Player> players)
      Constructs an event containing the final game state.
      Parameters:
      slotPlayerMap - the map associating each slot with the player occupying it.
      orderLogicCard - the order logic card that determines the player order.
      currentState - the current state of the game.
      players - the final list of players, used as the standings.
  • Method Details

    • apply

      public boolean apply(GameController gameController)
      Not applicable server-side.
      Specified by:
      apply in class NetworkEvent
      Parameters:
      gameController - the game controller (unused).
      Returns:
      false always.
    • apply

      public void apply(MiniModel miniModel)
      Applies this event to the client-side mini model, updating the final game state and setting the standings list for the leaderboard.
      Specified by:
      apply in class NetworkEvent
      Parameters:
      miniModel - the client-side model to update.