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
-
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:PieceProvider
Generate a piece on the board.- Specified by:
create
in interfacePieceProvider
-
createIntroduced
Description copied from interface:PieceProvider
Generates a new piece to be introduced to the board.- Specified by:
createIntroduced
in 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:PieceProvider
Generates a piece that has been moved from another tile on the board.- Specified by:
createMoved
in 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.
-