Package com.amirhn.Moves
Class EnPassant
java.lang.Object
com.amirhn.Moves.Move
com.amirhn.Moves.Capture
com.amirhn.Moves.EnPassant
The type En passant.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe Push pawn move.The Second destination.The Second source.Fields inherited from class com.amirhn.Moves.Capture
capturePiece, destination, source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyOnBoard(Board board) Apply on board boolean.Gets endpoint location.booleanIs allowed boolean.booleanisValidApplyOnBoard(Board board) Is valid apply on board boolean.toString()To string string.voidundoOnBoard(Board board) Undo on board.Methods inherited from class com.amirhn.Moves.Capture
getStartpointLocation
-
Field Details
-
secondSource
The Second source. -
secondDestination
The Second destination. -
pushPawnMove
The Push pawn move.
-
-
Constructor Details
-
EnPassant
Instantiates a new En passant.- Parameters:
pawn- the pawncapturePawn- the capture pawn
-
-
Method Details
-
applyOnBoard
Apply on board boolean.- Overrides:
applyOnBoardin classCapture- Parameters:
board- the board- Returns:
- the boolean
-
undoOnBoard
Undo on board.- Overrides:
undoOnBoardin classCapture- Parameters:
board- the board
-
isValidApplyOnBoard
Is valid apply on board boolean.- Overrides:
isValidApplyOnBoardin classCapture- Parameters:
board- the board- Returns:
- the boolean
-
isAllowed
Is allowed boolean. -
toString
To string string. -
getEndpointLocation
Gets endpoint location.- Overrides:
getEndpointLocationin classCapture- Returns:
- the endpoint location
-