VASSAL.command
Class RemovePiece
java.lang.Object
|
+--VASSAL.command.Command
|
+--VASSAL.command.RemovePiece
- public class RemovePiece
- extends Command
This Command removed a GamePiece from a game. Its undo
Command is AddPiece.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RemovePiece
public RemovePiece(GamePiece p)
RemovePiece
public RemovePiece(java.lang.String id)
executeCommand
protected void executeCommand()
- Removes a piece by invoking
Map.removePiece(VASSAL.counters.GamePiece) if the
piece belongs to a Map, followed by GameState#removePiece.
- 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()
getId
public java.lang.String getId()