Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
Loading...
Searching...
No Matches
interactive_helpers.h
Go to the documentation of this file.
1#pragma once
2#include <cstddef>
3#include "../defs.h"
4#include "../board/board.h"
5
10int ParseSquare2(const char* s);
11
16int ParsePromotionPiece(char c, int side);
17
27int LegalMovesFrom(S_BOARD* pos, int from,
28 int outMoves[], char labels[][8], int maxOut);
29
34int MatchDestinationMove(S_BOARD* pos, int from,
35 const char* destStr, const int legalMoves[], int nMoves);
int ParseSquare2(const char *s)
Parse "e2" style coordinate into a 120-based square index.
int LegalMovesFrom(S_BOARD *pos, int from, int outMoves[], char labels[][8], int maxOut)
Build list of legal moves that originate from from.
int ParsePromotionPiece(char c, int side)
Map promotion char ('q','r','b','n') to a piece code for the given side. Case-insensitive....
int MatchDestinationMove(S_BOARD *pos, int from, const char *destStr, const int legalMoves[], int nMoves)
Resolve a destination string ("e4", "e8=Q", "e8q") to a move.