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
Modifier and TypeFieldDescriptionThe Push pawn move.The Second destination.The Second source.Fields inherited from class com.amirhn.Moves.Capture
capturePiece, destination, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
applyOnBoard
(Board board) Apply on board boolean.Gets endpoint location.boolean
Is allowed boolean.boolean
isValidApplyOnBoard
(Board board) Is valid apply on board boolean.toString()
To string string.void
undoOnBoard
(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:
applyOnBoard
in classCapture
- Parameters:
board
- the board- Returns:
- the boolean
-
undoOnBoard
Undo on board.- Overrides:
undoOnBoard
in classCapture
- Parameters:
board
- the board
-
isValidApplyOnBoard
Is valid apply on board boolean.- Overrides:
isValidApplyOnBoard
in classCapture
- Parameters:
board
- the board- Returns:
- the boolean
-
isAllowed
Is allowed boolean. -
toString
To string string. -
getEndpointLocation
Gets endpoint location.- Overrides:
getEndpointLocation
in classCapture
- Returns:
- the endpoint location
-