Class RevealCommand
java.lang.Object
ca.uqam.info.student.skyjo.controller.RevealCommand
- All Implemented Interfaces:
ca.uqam.info.max.skyjo.controller.Command
This class is used to create a command for revealing card's value.
-
Constructor Summary
ConstructorsConstructorDescriptionRevealCommand(ca.uqam.info.max.skyjo.model.SkyjoModel model, int playerIndex, int x, int y) Creates a command to either draw a card into the buffer or reject the buffer card and reveal a specific card on the player's grid. -
Method Summary
-
Constructor Details
-
RevealCommand
public RevealCommand(ca.uqam.info.max.skyjo.model.SkyjoModel model, int playerIndex, int x, int y) Creates a command to either draw a card into the buffer or reject the buffer card and reveal a specific card on the player's grid.- Parameters:
model- the game model on which the command operates.playerIndex- the index of the current player executing the commandx- the column index of the card to reveal.y- the row index of the card to reveal
-
-
Method Details
-
isSpaceholder
public boolean isSpaceholder()- Specified by:
isSpaceholderin interfaceca.uqam.info.max.skyjo.controller.Command
-
execute
public void execute()- Specified by:
executein 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
-