Package com.amirhn.Moves
Class Promotion
java.lang.Object
com.amirhn.Moves.Move
com.amirhn.Moves.Promotion
- Direct Known Subclasses:
PawnPromotion
The type Promotion.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyOnBoard(Board board) Apply on board boolean.Gets endpoint location.Gets startpoint location.booleanisValidApplyOnBoard(Board board) Is valid apply on board boolean.toString()To string string.voidundoOnBoard(Board board) Undo on board.
-
Field Details
-
move
The Move. -
promotedPiece
The Promoted piece.
-
-
Constructor Details
-
Promotion
Instantiates a new Promotion.- Parameters:
move- the movepromotedPieceType- the promoted piece type
-
-
Method Details
-
applyOnBoard
Apply on board boolean.- Specified by:
applyOnBoardin classMove- Parameters:
board- the board- Returns:
- the boolean
-
undoOnBoard
Undo on board.- Specified by:
undoOnBoardin classMove- Parameters:
board- the board
-
isValidApplyOnBoard
Is valid apply on board boolean.- Overrides:
isValidApplyOnBoardin classMove- Parameters:
board- the board- Returns:
- the boolean
-
getEndpointLocation
Gets endpoint location.- Specified by:
getEndpointLocationin classMove- Returns:
- the endpoint location
-
getStartpointLocation
Gets startpoint location.- Specified by:
getStartpointLocationin classMove- Returns:
- the startpoint location
-
toString
To string string.
-