Class DrawLowerTribeCard
java.lang.Object
it.polimi.ingsw.gc14.Network.NetworkEvent
it.polimi.ingsw.gc14.Network.NetworkEvents.DrawLowerTribeCard
- All Implemented Interfaces:
Serializable
NetworkEvent to draw a tribe card from the lower card list.
- See Also:
-
Field Summary
FieldsFields inherited from class NetworkEvent
currentState, disconnectedPlayers, errorType, eventType, isError, orderLogicCard, playerList, slotPlayerMap, username -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(GameController gameController) Applies this event to the specified server-side game controller.voidApplies this event to the client-side mini model, removing the drawn card from the lower tribe list and updating players, turn order, game state, and slot map.Methods inherited from class NetworkEvent
enrichWithGameState, getErrorType, getEventType, getUsername, isError, setData, setErrorType, setIsError, toString
-
Field Details
-
pos
private final int posIndex of the card to draw
-
-
Constructor Details
-
DrawLowerTribeCard
Class constructor. Initializes all the attributes.- Parameters:
username- the name of the player requesting the eventpos- the index of the card to draw
-
-
Method Details
-
apply
Description copied from class:NetworkEventApplies this event to the specified server-side game controller.- Specified by:
applyin classNetworkEvent- Parameters:
gameController- the Game Controller on which to apply the event- Returns:
- true if the player could draw the card, false otherwise
-
apply
Applies this event to the client-side mini model, removing the drawn card from the lower tribe list and updating players, turn order, game state, and slot map.- Specified by:
applyin classNetworkEvent- Parameters:
miniModel- the client-side model to update.
-