Public Member Functions | List of all members
cwchess::EnPassant Class Reference

An object representing en passant information. More...

#include <EnPassant.h>

Public Member Functions

bool exists (void) const
 Return TRUE if the last move was a pawn advancing two squares.
 
Accessors
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.
 

Detailed Description

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.

See also
ChessPosition::en_passant

Definition at line 49 of file EnPassant.h.


The documentation for this class was generated from the following file:

Copyright © 2006 - 2010 Carlo Wood.  All rights reserved.