Class PieceCloner

java.lang.Object
VASSAL.counters.PieceCloner

public class PieceCloner extends Object
Utility class for cloning GamePieces
  • Constructor Details

    • PieceCloner

      protected PieceCloner()
  • Method Details

    • getInstance

      public static PieceCloner getInstance()
    • clonePiece

      public GamePiece clonePiece(GamePiece piece)
      Create a new instance that is a clone of the given piece. Expand any prototypes to create a fully functional piece
      Returns:
      the new instance
    • clonePieceUnexpanded

      public GamePiece clonePieceUnexpanded(GamePiece piece)
      Create a new instance that is a clone of the given piece. Do not expand any prototypes.
      Returns:
      the new instance
    • clonePiece

      public GamePiece clonePiece(GamePiece piece, boolean expandPiece)