Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
|
#include "board_data.h"
Go to the source code of this file.
Variables | |
char | pieceToCharacter [] = ".PNBRQKpnbrqk" |
Maps piece, side-to-move, rank and file to their character symbol. | |
char | SideChar [] = "wb-" |
char | rankToCharacter [] = "12345678" |
char | fileToCharacter [] = "abcdefgh" |
bool | isBigPiece [13] = { FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE } |
Lookup tables for piece attributes. | |
bool | isMajorPiece [13] = { FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE } |
bool | isMinorPiece [13] = { FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE } |
int | pieceValue [13] = { 0, 100, 325, 325, 550, 1000, 50000, 100, 325, 325, 550, 1000, 50000 } |
Material value of each piece type. | |
int | pieceColor [13] |
Color of each piece type. | |
bool | isPawn [13] = { FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE } |
bool | isKnight [13] = { FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE } |
bool | isKing [13] = { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE } |
bool | isRookQueen [13] = { FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE } |
bool | isBishopQueen [13] = { FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE } |
bool | isSlingPiece [13] = { FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE } |
int | Mirror64 [64] |
Square mirroring lookup from white's perspective. |
char fileToCharacter[] = "abcdefgh" |
Definition at line 6 of file board_data.cpp.
bool isBigPiece[13] = { FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE } |
Lookup tables for piece attributes.
Each array index corresponds to a piece constant (EMPTY, wP, wN, ..., bK). Boolean arrays return true if the piece matches the property:
Definition at line 8 of file board_data.cpp.
Referenced by AddPiece(), ClearPiece(), isBoardStateValid(), MovePiece(), and updateListsMaterial().
bool isBishopQueen[13] = { FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE } |
Definition at line 20 of file board_data.cpp.
bool isKing[13] = { FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE } |
Definition at line 18 of file board_data.cpp.
Referenced by makeMove(), and takeMove().
bool isKnight[13] = { FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE } |
Definition at line 17 of file board_data.cpp.
bool isMajorPiece[13] = { FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE } |
Definition at line 9 of file board_data.cpp.
Referenced by AddPiece(), ClearPiece(), isBoardStateValid(), and updateListsMaterial().
bool isMinorPiece[13] = { FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE } |
Definition at line 10 of file board_data.cpp.
Referenced by isBoardStateValid(), and updateListsMaterial().
bool isPawn[13] = { FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE } |
Definition at line 16 of file board_data.cpp.
Referenced by makeMove(), and takeMove().
bool isRookQueen[13] = { FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE } |
Definition at line 19 of file board_data.cpp.
bool isSlingPiece[13] = { FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE } |
Definition at line 21 of file board_data.cpp.
int Mirror64[64] |
Square mirroring lookup from white's perspective.
Indexed by 0–63 board square index. Returns the mirrored square index as if the board were flipped vertically. Useful for symmetrical evaluation and move generation.
Definition at line 23 of file board_data.cpp.
Referenced by mirrorBoardPosition().
int pieceColor[13] |
Color of each piece type.
Indexed by piece constant (EMPTY, wP, wN, ..., bK). Possible values: WHITE, BLACK, or BOTH (for EMPTY).
Definition at line 13 of file board_data.cpp.
Referenced by AddPiece(), ClearPiece(), generateAllCaptures(), generateAllMoves(), isBoardStateValid(), isSquareAttacked(), MovePiece(), takeMove(), and updateListsMaterial().
char pieceToCharacter[] = ".PNBRQKpnbrqk" |
Maps piece, side-to-move, rank and file to their character symbol.
For example: black king = 'k', white pawn = 'P', file 1 = 'a' etc.
Definition at line 3 of file board_data.cpp.
Referenced by printBoardState().
int pieceValue[13] = { 0, 100, 325, 325, 550, 1000, 50000, 100, 325, 325, 550, 1000, 50000 } |
Material value of each piece type.
Indexed by piece constant (EMPTY, wP, wN, ..., bK). Value is in centipawns, e.g., pawn = 100, queen = 1000, king = 50000.
Definition at line 12 of file board_data.cpp.
Referenced by AddPiece(), ClearPiece(), isBoardStateValid(), and updateListsMaterial().
char rankToCharacter[] = "12345678" |
Definition at line 5 of file board_data.cpp.
char SideChar[] = "wb-" |
Definition at line 4 of file board_data.cpp.
Referenced by printBoardState().