|
Chess 0.0.1
A library written in c
|
Represents the position in a chess game. More...
#include <position.h>
Data Fields | |
| ChessPiece | board [128] |
| ChessSquare | pieces [CHESS_COLOR_BLACK+1][CHESS_PIECE_TYPE_KING+1][12] |
| uint8_t | piece_counts [CHESS_COLOR_BLACK+1][CHESS_PIECE_TYPE_KING+1] |
| uint8_t | piece_indices [128] |
| ChessColor | side_to_move |
| ChessCastlingRights | castling_rights |
| ChessSquare | en_passant_square |
| unsigned int | half_move_clock |
| unsigned int | full_move_number |
| ChessPositionCounter | position_counter |
Represents the position in a chess game.
| ChessPiece ChessPosition::board[128] |
Array representing the pieces on each square (0x88 board).
| ChessCastlingRights ChessPosition::castling_rights |
The current castling rights for both sides.
| ChessSquare ChessPosition::en_passant_square |
The square over which a pawn has just passed while moving two squares, or CHESS_SQUARE_NONE if not available.
| unsigned int ChessPosition::full_move_number |
The number of the full moves. It starts at 1 and is incremented after Black's move.
| unsigned int ChessPosition::half_move_clock |
The number of halfmoves since the last capture or pawn advance, used for the fifty-move rule.
| uint8_t ChessPosition::piece_counts[CHESS_COLOR_BLACK+1][CHESS_PIECE_TYPE_KING+1] |
Array storing the count of each piece type for both colors.
| uint8_t ChessPosition::piece_indices[128] |
Array storing the index of the piece on each square in the piece list
| ChessSquare ChessPosition::pieces[CHESS_COLOR_BLACK+1][CHESS_PIECE_TYPE_KING+1][12] |
Array storing the squares of each piece type for both colors.
| ChessPositionCounter ChessPosition::position_counter |
Counter for position repetitions (for threefold repetition rule).
| ChessColor ChessPosition::side_to_move |
The color of the side to move next.