Package VASSAL.command
Class AddPiece
java.lang.Object
VASSAL.command.Command
VASSAL.command.AddPiece
This Command adds a
GamePiece
to a game. Its undo
Command is RemovePiece
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds a piece by invokingGameState.addPiece(VASSAL.counters.GamePiece)
, followed byGamePiece.setState(java.lang.String)
getState()
protected Command
If the action can be undone, return a Command that performs the inverse action.Methods inherited from class VASSAL.command.Command
append, execute, getDetails, getSubCommands, getUndoCommand, isAtomic, isLoggable, isNull, isNullOrContainsOnly, stripSubCommands, toString
-
Constructor Details
-
AddPiece
-
AddPiece
-
-
Method Details
-
executeCommand
protected void executeCommand()Adds a piece by invokingGameState.addPiece(VASSAL.counters.GamePiece)
, followed byGamePiece.setState(java.lang.String)
- Specified by:
executeCommand
in classCommand
-
myUndoCommand
Description copied from class:Command
If the action can be undone, return a Command that performs the inverse action. The Command returned should only undoCommand.executeCommand()
, not the actions of subcommands- Specified by:
myUndoCommand
in classCommand
-
getTarget
-
getState
-