10 for (
int i = 0; i < moves->
count; ++i) {
12 const int from =
FROMSQ(m);
13 const int to =
TOSQ(m);
39 return (fr >= 0 && fr <= 7);
43 return (pce >=
EMPTY && pce <=
bK);
47 return (pce >=
wP && pce <=
bK);
int fileIndex120[BRD_SQ_NUM]
File and rank lookup tables for each square (120-based).
S_MOVE moves[MAXPOSITIONMOVES]
int SqIs120(const int sq)
Checks if a given square index is within the 120-based range.
int MoveListOk(const S_MOVELIST *moves, const S_BOARD *board)
Validates that a move list is within bounds and references valid moves.
int PceValidEmptyOffbrd(const int pce)
Checks if the given piece code is empty, valid, or OFFBOARD.
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 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.