Fix Betza notation for royal fairy pieces
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 25 Jan 2020 22:49:56 +0000 (23:49 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 25 Jan 2020 22:49:56 +0000 (23:49 +0100)
src/ucioption.cpp

index 2f354e1..628f7ba 100644 (file)
@@ -92,7 +92,7 @@ void on_variant_change(const Option &o) {
                     suffix += "s";
                 suffix += "@" + std::to_string(pt == PAWN && !v->promotionZonePawnDrops ? v->promotionRank : v->maxRank + 1);
             }
-            sync_cout << "piece " << v->pieceToChar[pt] << "& " << pieceMap.find(pt)->second->betza << suffix << sync_endl;
+            sync_cout << "piece " << v->pieceToChar[pt] << "& " << pieceMap.find(pt == KING ? v->kingType : pt)->second->betza << suffix << sync_endl;
             PieceType promType = v->promotedPieceType[pt];
             if (promType)
                 sync_cout << "piece +" << v->pieceToChar[pt] << "& " << pieceMap.find(promType)->second->betza << sync_endl;