Class PlayCharacterCardHandler
java.lang.Object
it.polimi.ingsw.eriantys.controller.phases.PlayCharacterCardHandler
- All Implemented Interfaces:
MessageHandler
- Direct Known Subclasses:
MotherNatureDestinationHandler
,MoveStudentHandler
,SelectCloudHandler
This concrete implementation for the state design pattern involving
MessageHandler
defines how the action phase message PlayCharacterCard
should be processed.-
Field Summary
-
Constructor Summary
ConstructorDescriptionPlayCharacterCardHandler
(Game game) Constructs a newPlayCharacterCardHandler
for the specified game. -
Method Summary
Modifier and TypeMethodDescriptiongetHelp()
Returns a help message which lists the possible user actions for the current phase of the game.void
Handles and responds to the specified message received by the client, according to the rules regarding the current phase of the game.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.polimi.ingsw.eriantys.controller.phases.MessageHandler
handleDisconnectedUser, sendReconnectUpdate
-
Field Details
-
game
-
-
Constructor Details
-
PlayCharacterCardHandler
Constructs a newPlayCharacterCardHandler
for the specified game.- Parameters:
game
- theGame
this message handler refers to.
-
-
Method Details
-
handle
Description copied from interface:MessageHandler
Handles and responds to the specified message received by the client, according to the rules regarding the current phase of the game.- Specified by:
handle
in interfaceMessageHandler
- Parameters:
m
- theGameMessage
received by the client.- Throws:
NoConnectionException
- if no connection can be retrieved for the sender of the message.
-
getHelp
Description copied from interface:MessageHandler
Returns a help message which lists the possible user actions for the current phase of the game.- Specified by:
getHelp
in interfaceMessageHandler
- Returns:
- a help message which lists the possible user actions for the current phase of the game.
-