Class Action
java.lang.Object
be.belegkarnil.game.board.spectrangle.Action
This class represents all possible actions during a
Game.- Author:
- Belegkarnil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum number of rotation that can be applied to aPiecefinal PieceThe piece played during the actionfinal PointThe position at which to put the piece during the actionfinal booleanThe replace/swap request during the actionfinal intThe rotation applied to the piece played during the action -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
piece
The piece played during the action -
replace
public final boolean replaceThe replace/swap request during the action -
rotation
public final int rotationThe rotation applied to the piece played during the action -
position
The position at which to put the piece during the action -
MAX_ROTATION
public static final int MAX_ROTATIONThe maximum number of rotation that can be applied to aPiece- See Also:
-
-
Constructor Details
-
Action
Construct an action to replace/swap action (i.e. put a piece in the bag and ask another)- Parameters:
piece- the piece to put back in the bag
-
Action
public Action()Construct an action to skip turn, no action -
Action
Construct an action to play a piece on the board- Parameters:
piece- the piece to put on the board at pos positionposition- the position to put the piece onrotation- the number of clockwise rotation to apply on the piece
-
-
Method Details