From: Fabian Fichter Date: Sun, 12 Jan 2020 20:35:03 +0000 (+0100) Subject: Implement XBoard Betza notation for castling X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ea594ce74a3013d0d186a272e2890493bfefea24;p=fairystockfish.git Implement XBoard Betza notation for castling --- diff --git a/src/ucioption.cpp b/src/ucioption.cpp index c01c30f..c5e119a 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -73,12 +73,15 @@ void on_variant_change(const Option &o) { << " " << v->startFen << sync_endl; // Send piece command with Betza notation + // https://www.gnu.org/software/xboard/Betza.html for (PieceType pt : v->pieceTypes) { string suffix = pt == PAWN && v->doubleStep ? "ifmnD" : pt == KING && v->cambodianMoves ? "ismN" : pt == FERS && v->cambodianMoves ? "ifnD" : ""; + if (pt == KING && v->castling) + suffix += "O" + std::to_string((v->castlingKingsideFile - v->castlingQueensideFile) / 2); if (v->pieceDrops) { if (pt == PAWN && !v->firstRankPawnDrops)