Package VASSAL.build.module
Class Map.Merger
java.lang.Object
VASSAL.build.module.Map.Merger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a command that merges our piece into the specified deck, provided that the Deck shares the location of our merger point provided in the constructor.visitDefault
(GamePiece piece) GamePieces that are not handled by one of the type-specific methods (e.g.visitStack
(Stack s) Returns a command to merge our piece into the specified stack, provided that the stack is in the precise map location specified, the map allows stacking, our piece allows stacking, and our stack and piece are in the same layer.
-
Constructor Details
-
Merger
-
-
Method Details
-
visitDeck
Returns a command that merges our piece into the specified deck, provided that the Deck shares the location of our merger point provided in the constructor. A Mat with cargo loaded is not allowed into a Deck- Specified by:
visitDeck
in interfaceDeckVisitor
- Parameters:
d
- Deck to consider merging into- Returns:
- A command to merge our piece into the specified deck, or null if deck isn't in correct position
-
visitStack
Returns a command to merge our piece into the specified stack, provided that the stack is in the precise map location specified, the map allows stacking, our piece allows stacking, and our stack and piece are in the same layer.- Specified by:
visitStack
in interfacePieceVisitor
- Parameters:
s
- Stack to consider merging with- Returns:
- Command to merge into the stack, or null if any of the necessary conditions weren't met
-
visitDefault
Description copied from interface:PieceVisitor
GamePieces that are not handled by one of the type-specific methods (e.g.PieceVisitor.visitStack(VASSAL.counters.Stack)
) are handled here- Specified by:
visitDefault
in interfacePieceVisitor
- Parameters:
piece
- piece to consider forming a new stack with.- Returns:
- a command to form a new stack with a piece found at the our location, provided all of the conditions to form a stack are met. Returns null if the necessary conditions aren't met.
-