Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
|
#include "../defs.h"
Go to the source code of this file.
Functions | |
int | SqOnBoard (const int sq) |
Checks if a given square index refers to a valid on-board square. | |
int | SideValid (const int side) |
Checks if the given side identifier is valid. | |
int | FileRankValid (const int fr) |
Checks if a file or rank index is valid (0–7). | |
int | pieceValueidEmpty (const int pce) |
Checks if the given piece code is either empty or a valid piece. | |
int | pieceValueid (const int pce) |
Checks if the given piece code is a valid piece (non-empty). | |
int | SqIs120 (const int sq) |
Checks if a given square index is within the 120-based range. | |
int | PceValidEmptyOffbrd (const int pce) |
Checks if the given piece code is empty, valid, or OFFBOARD. | |
int | MoveListOk (const S_MOVELIST *list, const S_BOARD *pos) |
Validates that a move list is within bounds and references valid moves. | |
void | MirrorEvalTest (S_BOARD *pos) |
Mirrors the board position and evaluates it (used for testing). | |
void | DebugAnalysisTest (S_BOARD *pos, S_SEARCHINFO *info) |
Runs a debug analysis test (used for search engine testing). |
|
extern |
Runs a debug analysis test (used for search engine testing).
pos | Pointer to the board state. |
info | Pointer to search information. |
|
extern |
Checks if a file or rank index is valid (0–7).
fr | The file or rank index. |
Definition at line 38 of file validate.cpp.
|
extern |
Mirrors the board position and evaluates it (used for testing).
pos | Pointer to the board state. |
|
extern |
Validates that a move list is within bounds and references valid moves.
list | Pointer to the move list. |
pos | Pointer to the board state. |
Definition at line 7 of file validate.cpp.
References S_MOVELIST::count, FALSE, FROMSQ, MAXPOSITIONMOVES, S_MOVE::move, S_MOVELIST::moves, S_BOARD::pieces, pieceValueidEmpty(), SqOnBoard(), TOSQ, and TRUE.
Referenced by generateAllCaptures(), and generateAllMoves().
|
extern |
Checks if the given piece code is empty, valid, or OFFBOARD.
pce | Piece code to check. |
Definition at line 25 of file validate.cpp.
References bK, EMPTY, and OFFBOARD.
Referenced by isSquareAttacked(), and updateListsMaterial().
|
extern |
Checks if the given piece code is a valid piece (non-empty).
pce | Piece code to check. |
Definition at line 46 of file validate.cpp.
Referenced by AddCaptureMove(), AddPiece(), ClearPiece(), generateAllCaptures(), generateAllMoves(), makeMove(), MovePiece(), and takeMove().
|
extern |
Checks if the given piece code is either empty or a valid piece.
pce | Piece code to check. |
Definition at line 42 of file validate.cpp.
Referenced by AddBlackPawnCapMove(), AddWhitePawnCapMove(), and MoveListOk().
|
extern |
Checks if the given side identifier is valid.
side | Side value to check (WHITE or BLACK). |
Definition at line 34 of file validate.cpp.
Referenced by AddPiece(), ClearPiece(), isSquareAttacked(), makeMove(), MovePiece(), and updateListsMaterial().
|
extern |
Checks if a given square index is within the 120-based range.
sq | The square index to check. |
Definition at line 21 of file validate.cpp.
References BRD_SQ_NUM.
Referenced by isSquareAttacked().
|
extern |
Checks if a given square index refers to a valid on-board square.
sq | The 120-based square index. |
Definition at line 29 of file validate.cpp.
References BRD_SQ_NUM, fileIndex120, and OFFBOARD.
Referenced by AddBlackPawnCapMove(), AddBlackPawnMove(), AddCaptureMove(), AddEnPassantMove(), AddPiece(), AddQuietMove(), AddWhitePawnCapMove(), AddWhitePawnMove(), ClearPiece(), generateAllCaptures(), generateAllMoves(), generatePositionKeys(), initSquareIndexMaps(), isPieceListValid(), isSquareAttacked(), makeMove(), MoveListOk(), MovePiece(), parseMoveString(), and takeMove().