Scid
4.7.0
|
Functions | |
bool | valid_king (squareT sqFrom, squareT sqTo) |
bool | valid_knight (squareT sqFrom, squareT sqTo) |
int | valid_slider (squareT sqFrom, squareT sqTo, pieceT pieceType) |
bool | attack_pawn (squareT sqFrom, squareT sqTo, colorT pieceCol) |
template<typename TBoard > | |
bool | attack_slider (squareT sqFrom, squareT sqTo, pieceT pieceType, const TBoard *board, const TBoard EMPTY_SQUARE) |
template<typename TBoard > | |
bool | attack (squareT sqFrom, squareT sqTo, pieceT pieceCol, pieceT pieceType, const TBoard *board, const TBoard EMPTY_SQUARE) |
Validate an ATTACK move, that is if a piece placed at sqFrom can capture an enemy piece at sqTo. More... | |
template<typename TBoard > | |
bool | pseudo (squareT sqFrom, squareT sqTo, colorT, pieceT pieceType, const TBoard *board, const TBoard EMPTY_SQUARE) |
template<typename TBoard > | |
std::pair< pieceT, squareT > | opens_ray (squareT sqFrom, squareT sqTo, squareT sqRay, const TBoard *board, const TBoard EMPTY_SQUARE) |
Given a pseudo-legal move, this functions return the type and the location of the piece that can possibly pin the moving piece, making the move not legal. More... | |
Variables | |
const int | NSQUARES = 8 |
bool movegen::attack | ( | squareT | sqFrom, |
squareT | sqTo, | ||
pieceT | pieceCol, | ||
pieceT | pieceType, | ||
const TBoard * | board, | ||
const TBoard | EMPTY_SQUARE | ||
) |
Validate an ATTACK move, that is if a piece placed at sqFrom can capture an enemy piece at sqTo.
sqFrom | square of the piece. |
sqTo | square of the piece to be captured. |
pieceCol | color of the moving piece. |
pieceType | type of the moving piece. |
board | pointer to the board position; it's is irrelevant if the position is the one before or after the move was made. |
EMPTY_SQUARE | value of an empty square in the board position. |
|
inline |
Given a pseudo-legal move, this functions return the type and the location of the piece that can possibly pin the moving piece, making the move not legal.
sqFrom | start square of the pseudo-legal move. |
sqTo | destination square of the pseudo-legal move. |
sqRay | the projected ray starts from sqRay and goes through sqFrom; it is usually the square where the king is. |
board | pointer to the board position where the pseudo-legal move has to be made. |
EMPTY_SQUARE | value of an empty square in the board position. |