Package com.amirhn.Moves
Class PawnPromotion
java.lang.Object
com.amirhn.Moves.Move
com.amirhn.Moves.Promotion
com.amirhn.Moves.PawnPromotion
The type Pawn promotion.
-
Field Summary
Fields inherited from class com.amirhn.Moves.Promotion
move, promotedPiece
-
Constructor Summary
ConstructorDescriptionPawnPromotion
(Move move, PieceType promotedPieceType) Instantiates a new Pawn promotion. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Is allowed boolean.boolean
isValidApplyOnBoard
(Board board) Is valid apply on board boolean.Methods inherited from class com.amirhn.Moves.Promotion
applyOnBoard, getEndpointLocation, getStartpointLocation, toString, undoOnBoard
-
Constructor Details
-
PawnPromotion
Instantiates a new Pawn promotion.- Parameters:
move
- the movepromotedPieceType
- the promoted piece type
-
-
Method Details
-
isValidApplyOnBoard
Is valid apply on board boolean.- Overrides:
isValidApplyOnBoard
in classPromotion
- Parameters:
board
- the board- Returns:
- the boolean
-
isAllowed
Is allowed boolean.
-