Chess 0.0.1
A library written in c
|
Defines the chess castling rights type and related utility functions for representing and manipulating chess castling rights. More...
Go to the source code of this file.
Enumerations | |
enum | ChessCastlingRights : uint8_t { CHESS_CASTLING_RIGHTS_NONE = 0U , CHESS_CASTLING_RIGHTS_WHITE_KINGSIDE = 1U << 0U , CHESS_CASTLING_RIGHTS_WHITE_QUEENSIDE = 1U << 1U , CHESS_CASTLING_RIGHTS_BLACK_KINGSIDE = 1U << 2U , CHESS_CASTLING_RIGHTS_BLACK_QUEENSIDE = 1U << 3U , CHESS_CASTLING_RIGHTS_WHITE = CHESS_CASTLING_RIGHTS_WHITE_KINGSIDE | CHESS_CASTLING_RIGHTS_WHITE_QUEENSIDE , CHESS_CASTLING_RIGHTS_BLACK = CHESS_CASTLING_RIGHTS_BLACK_KINGSIDE | CHESS_CASTLING_RIGHTS_BLACK_QUEENSIDE , CHESS_CASTLING_RIGHTS_ALL = CHESS_CASTLING_RIGHTS_WHITE | CHESS_CASTLING_RIGHTS_BLACK } |
Represents the castling rights in a chess game. More... | |
Functions | |
void | chess_castling_rights_debug (ChessCastlingRights rights) |
Prints a debug representation of the given castling rights. | |
bool | chess_castling_rights_is_valid (ChessCastlingRights rights) |
Checks if the given castling rights are valid. | |
Defines the chess castling rights type and related utility functions for representing and manipulating chess castling rights.
enum ChessCastlingRights : uint8_t |
Represents the castling rights in a chess game.
void chess_castling_rights_debug | ( | ChessCastlingRights | rights | ) |
Prints a debug representation of the given castling rights.
[in] | rights | The castling rights to print. |
bool chess_castling_rights_is_valid | ( | ChessCastlingRights | rights | ) |
Checks if the given castling rights are valid.
rights | The castling rights to check. |