Class ChangePiece

java.lang.Object
VASSAL.command.Command
VASSAL.command.ChangePiece

public class ChangePiece extends Command
This Command changes the state of a GamePiece. Its undo Command is another ChangePiece with the new and old states reversed.
  • Field Details

    • newState

      protected String newState
    • oldState

      protected String oldState
  • Constructor Details

    • ChangePiece

      public ChangePiece(String id, String oldState, String newState)
      Parameters:
      id - the id of the GamePiece to change
      oldState - the previous state of the piece
      newState - the new state of the piece
    • ChangePiece

      @Deprecated(since="2020-08-06", forRemoval=true) public ChangePiece(String id, String newState)
      Deprecated, for removal: This API element is subject to removal in a future version.
      When using this constructor, the previous state will be set to that of the piece when this Command is executed.
  • Method Details