Class ApplyNextRound

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

public class ApplyNextRound extends NetworkEvent
Network event that transitions all clients to the next round.

Carries refreshed card lists for all four board rows in addition to the standard game state (slot map, turn order, current state, player list). Only applied client-side; apply(GameController) always returns false.

See Also:
  • Field Details

    • upperListTribeCards

      private final ArrayList<TribeCard> upperListTribeCards
      Tribe cards shown in the upper row of the board for the new round.
    • lowerListTribeCards

      private final ArrayList<TribeCard> lowerListTribeCards
      Tribe cards shown in the lower row of the board for the new round.
    • upperListBuildingCards

      private final ArrayList<BuildingCard> upperListBuildingCards
      Building cards shown in the upper row of the board for the new round.
    • lowerListBuildingCards

      private final ArrayList<BuildingCard> lowerListBuildingCards
      Building cards shown in the lower row of the board for the new round.
  • Constructor Details

    • ApplyNextRound

      public ApplyNextRound(Map<Slot,Player> slotPlayerMap, OrderLogicCard orderLogicCard, CurrentState currentState, List<Player> players, ArrayList<TribeCard> upperListTribeCards, ArrayList<TribeCard> lowerListTribeCards, ArrayList<BuildingCard> upperListBuildingCards, ArrayList<BuildingCard> lowerListBuildingCards)
      Constructs an event that updates the game state for the next round.
      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 list of players in the game.
      upperListTribeCards - the upper row of tribe cards for the new round.
      lowerListTribeCards - the lower row of tribe cards for the new round.
      upperListBuildingCards - the upper row of building cards for the new round.
      lowerListBuildingCards - the lower row of building cards for the new round.
  • 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 all board lists, slot map, turn order, and game state for the new round.
      Specified by:
      apply in class NetworkEvent
      Parameters:
      miniModel - the client-side model to update.