Package VASSAL.command
Class AddPiece
java.lang.Object
VASSAL.command.Command
VASSAL.command.AddPiece
public class AddPiece extends Command
This Command adds a
GamePiece to a game. Its undo
Command is RemovePiece.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected voidexecuteCommand()Adds a piece by invokingGameState.addPiece(VASSAL.counters.GamePiece), followed byGamePiece.setState(java.lang.String)StringgetState()GamePiecegetTarget()protected CommandmyUndoCommand()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, hasNullSubcommands, isAtomic, isLoggable, isNull, 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:
executeCommandin classCommand
-
myUndoCommand
Description copied from class:CommandIf 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:
myUndoCommandin classCommand
-
getTarget
-
getState
-