Package net.royalur.rules.simple
Class SimplePieceProvider
java.lang.Object
net.royalur.rules.simple.SimplePieceProvider
- All Implemented Interfaces:
PieceProvider
Provides new instances of, and manipulations to, simple pieces.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(PlayerType owner, int pathIndex) Generate a piece on the board.createIntroduced(PlayerType owner, int newPathIndex) Generates a new piece to be introduced to the board.createMoved(Piece fromPiece, int newPathIndex) Generates a piece that has been moved from another tile on the board.
-
Constructor Details
-
SimplePieceProvider
public SimplePieceProvider()
-
-
Method Details
-
create
Description copied from interface:PieceProviderGenerate a piece on the board.- Specified by:
createin interfacePieceProvider
-
createIntroduced
Description copied from interface:PieceProviderGenerates a new piece to be introduced to the board.- Specified by:
createIntroducedin interfacePieceProvider- Parameters:
owner- The owner of the new piece.newPathIndex- The destination index of the piece in the player's path.- Returns:
- The new piece that may be introduced to the board.
-
createMoved
Description copied from interface:PieceProviderGenerates a piece that has been moved from another tile on the board.- Specified by:
createMovedin interfacePieceProvider- Parameters:
fromPiece- The piece that will be moved.newPathIndex- The destination index of the piece in the player's path.- Returns:
- The new piece to be placed on the board.
-