Class ReduceColumnCommand
java.lang.Object
ca.uqam.info.student.skyjo.controller.ReduceColumnCommand
- All Implemented Interfaces:
ca.uqam.info.max.skyjo.controller.Command
public class ReduceColumnCommand
extends Object
implements ca.uqam.info.max.skyjo.controller.Command
This class is used to create a command for eliminating a determinate column
to the player's grid.
-
Constructor Summary
ConstructorsConstructorDescriptionReduceColumnCommand(ca.uqam.info.max.skyjo.model.SkyjoModel model, int playerIndex, int positionX) Creates a command to eliminate a column. -
Method Summary
-
Constructor Details
-
ReduceColumnCommand
public ReduceColumnCommand(ca.uqam.info.max.skyjo.model.SkyjoModel model, int playerIndex, int positionX) Creates a command to eliminate a column.- Parameters:
model- the game model on which the command operates.playerIndex- the index of the current player executing the commandpositionX- the column that will be deleted.
-
-
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
-