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
ConstructorsConstructorDescriptionPawnPromotion(Move move, PieceType promotedPieceType) Instantiates a new Pawn promotion. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs allowed boolean.booleanisValidApplyOnBoard(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:
isValidApplyOnBoardin classPromotion- Parameters:
board- the board- Returns:
- the boolean
-
isAllowed
Is allowed boolean.
-