engine/san.h

Standard Algebraic Notation for encoded moves.

The engine speaks UCI (“g1f3”); every human-facing move list speaks SAN (“Nf3”). The web app can lean on chess.js for this, but the appliance is offline and the GUI’s review screen still needs a readable move list — so SAN is generated here, from the same movegen the engine already uses for disambiguation and check detection.

Both entry points read the CURRENT global board state (the position BEFORE the move) and leave it untouched.

Functions

std::string moveToSan(int encodedMove)
std::vector<std::string> gameToSan(const std::string &startFen, const std::vector<std::string> &uciMoves)
std::string moveToUci(int encodedMove)
int sanToMove(const std::string &san)