Class MotherNatureDestinationHandler
java.lang.Object
it.polimi.ingsw.eriantys.controller.phases.PlayCharacterCardHandler
it.polimi.ingsw.eriantys.controller.phases.MotherNatureDestinationHandler
- All Implemented Interfaces:
MessageHandler
This concrete implementation for the state design pattern involving
MessageHandler
defines how the action phase message MotherNatureDestination should be processed.-
Field Summary
Fields inherited from class it.polimi.ingsw.eriantys.controller.phases.PlayCharacterCardHandler
game -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidHandles and responds to the specified message received by the client, according to the rules regarding the current phase of the game.voidhandleDisconnectedUser(String username) Plays the specified user's turn according to the rules if they are disconnected and the game is not idle.voidsendReconnectUpdate(String username) Sends a broadcast update after the specified user's reconnection in order to make sure every player has the information they need in order to play.Methods inherited from class it.polimi.ingsw.eriantys.controller.phases.PlayCharacterCardHandler
getHelp
-
Constructor Details
-
MotherNatureDestinationHandler
Constructs a newMotherNatureDestinationHandlerfor the specified game.- Parameters:
game- theGamethis message handler refers to.
-
-
Method Details
-
handle
Description copied from interface:MessageHandlerHandles and responds to the specified message received by the client, according to the rules regarding the current phase of the game.- Specified by:
handlein interfaceMessageHandler- Overrides:
handlein classPlayCharacterCardHandler- Parameters:
m- theGameMessagereceived by the client.- Throws:
NoConnectionException- if no connection can be retrieved for the sender of the message.
-
handleDisconnectedUser
Description copied from interface:MessageHandlerPlays the specified user's turn according to the rules if they are disconnected and the game is not idle.- Parameters:
username- the disconnected user's username.
-
sendReconnectUpdate
Description copied from interface:MessageHandlerSends a broadcast update after the specified user's reconnection in order to make sure every player has the information they need in order to play.- Parameters:
username- the reconnected user's username.
-