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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AddPiece
public AddPiece(GamePiece p)
AddPiece
public AddPiece(GamePiece p,
java.lang.String state)
executeCommand
protected void executeCommand()
- Adds a piece by invoking
GameState.addPiece(VASSAL.counters.GamePiece), followed by
GamePiece.setState(java.lang.String)
- Overrides:
executeCommand in class Command
myUndoCommand
protected Command 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 undo
Command.executeCommand(), not the actions of subcommands
- Overrides:
myUndoCommand in class Command
getTarget
public GamePiece getTarget()
getState
public java.lang.String getState()