Class EndTurnCommand
java.lang.Object
ca.uqam.info.student.skyjo.controller.EndTurnCommand
- All Implemented Interfaces:
ca.uqam.info.max.skyjo.controller.Command
Command representing the end of a player's turn.
When executed, this command advances the game to the next player.
If the current player has revealed all their cards and no game ender
has been set yet, this player is marked as the game ender.
-
Constructor Summary
ConstructorsConstructorDescriptionEndTurnCommand(ca.uqam.info.max.skyjo.model.SkyjoModel model) Constructs an EndTurnCommand associated with the given model. -
Method Summary
-
Constructor Details
-
EndTurnCommand
public EndTurnCommand(ca.uqam.info.max.skyjo.model.SkyjoModel model) Constructs an EndTurnCommand associated with the given model.- Parameters:
model- the game model used to update the current player and game state
-
-
Method Details
-
execute
public void execute()- Specified by:
executein interfaceca.uqam.info.max.skyjo.controller.Command
-
isSpaceholder
public boolean isSpaceholder()- Specified by:
isSpaceholderin interfaceca.uqam.info.max.skyjo.controller.Command
-
undo
public void undo()- Specified by:
undoin interfaceca.uqam.info.max.skyjo.controller.Command
-
isUndoable
public boolean isUndoable()- Specified by:
isUndoablein interfaceca.uqam.info.max.skyjo.controller.Command
-
getFollowUpCommands
public ca.uqam.info.max.skyjo.controller.Command[] getFollowUpCommands()- Specified by:
getFollowUpCommandsin interfaceca.uqam.info.max.skyjo.controller.Command
-
toString
-