Class ApplyNextRound
java.lang.Object
it.polimi.ingsw.gc14.Network.NetworkEvent
it.polimi.ingsw.gc14.Network.NetworkEvents.ApplyNextRound
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayList<BuildingCard> Building cards shown in the lower row of the board for the new round.Tribe cards shown in the lower row of the board for the new round.private final ArrayList<BuildingCard> Building cards shown in the upper row of the board for the new round.Tribe cards shown in the upper row of the board for the new round.Fields inherited from class NetworkEvent
currentState, disconnectedPlayers, errorType, eventType, isError, orderLogicCard, playerList, slotPlayerMap, username -
Constructor Summary
ConstructorsConstructorDescriptionApplyNextRound(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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(GameController gameController) Not applicable server-side.voidApplies this event to the client-side mini model, updating all board lists, slot map, turn order, and game state for the new round.Methods inherited from class NetworkEvent
enrichWithGameState, getErrorType, getEventType, getUsername, isError, setData, setErrorType, setIsError, toString
-
Field Details
-
upperListTribeCards
-
lowerListTribeCards
-
upperListBuildingCards
Building cards shown in the upper row of the board for the new round. -
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
Not applicable server-side.- Specified by:
applyin classNetworkEvent- Parameters:
gameController- the game controller (unused).- Returns:
falsealways.
-
apply
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:
applyin classNetworkEvent- Parameters:
miniModel- the client-side model to update.
-