Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
Loading...
Searching...
No Matches
validate.h
Go to the documentation of this file.
1// validate.h
2#pragma once
3
4#include "../defs.h"
5
11extern int SqOnBoard(const int sq);
12
18extern int SideValid(const int side);
19
25extern int FileRankValid(const int fr);
26
32extern int pieceValueidEmpty(const int pce);
33
39extern int pieceValueid(const int pce);
40
46extern int SqIs120(const int sq);
47
53extern int PceValidEmptyOffbrd(const int pce);
54
61extern int MoveListOk(const S_MOVELIST* list, const S_BOARD* pos);
62
67extern void MirrorEvalTest(S_BOARD* pos);
68
74extern void DebugAnalysisTest(S_BOARD* pos, S_SEARCHINFO* info);
void DebugAnalysisTest(S_BOARD *pos, S_SEARCHINFO *info)
Runs a debug analysis test (used for search engine testing).
int SqIs120(const int sq)
Checks if a given square index is within the 120-based range.
Definition validate.cpp:21
void MirrorEvalTest(S_BOARD *pos)
Mirrors the board position and evaluates it (used for testing).
int PceValidEmptyOffbrd(const int pce)
Checks if the given piece code is empty, valid, or OFFBOARD.
Definition validate.cpp:25
int FileRankValid(const int fr)
Checks if a file or rank index is valid (0–7).
Definition validate.cpp:38
int pieceValueidEmpty(const int pce)
Checks if the given piece code is either empty or a valid piece.
Definition validate.cpp:42
int pieceValueid(const int pce)
Checks if the given piece code is a valid piece (non-empty).
Definition validate.cpp:46
int SqOnBoard(const int sq)
Checks if a given square index refers to a valid on-board square.
Definition validate.cpp:29
int SideValid(const int side)
Checks if the given side identifier is valid.
Definition validate.cpp:34
int MoveListOk(const S_MOVELIST *list, const S_BOARD *pos)
Validates that a move list is within bounds and references valid moves.
Definition validate.cpp:7