An object representing en passant information. More...
|bool||exists (void) const|
|Return TRUE if the last move was a pawn advancing two squares. |
|Index||index (void) const|
|Return the index of the square that was passed. |
|Index||pawn_index (void) const|
|Return the index of the pawn that just advanced two squares. |
|Index||from_index (void) const|
|Return the index of the square that pawn came from. |
|bool||pinned (void) const|
|Return TRUE if taking en passant is not allowed due to horizontal pinning. |
An object representing en passant information.
This is an internal class, you should not normally need.
If EnPassant::exists() returns true, then a pawn exists that can be taken en passant, or could be taken en passant if an enemy pawn was standing next to it. This means that in 'position setup mode', placing a pawn next to the en passant pawn (on index EnPassant::pawn_index()) will be able to take the en passant pawn.