From 50be320c33bd942b238e8f82aa34230539878bab Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 28 Jul 2026 12:50:36 +0200 Subject: changes --- src/uci.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index a2c3672..42be55d 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -5,6 +5,7 @@ #include "moves.hpp" #include +#include #include #include #include @@ -99,6 +100,24 @@ void Uci() { cout << "bestmove "; cout << (char)(best.From.file + 'a') << 8 - best.From.rank << (char)(best.To.file + 'a') << 8 - best.To.rank; + if (best.promotion != NONE) { + switch (best.promotion) { + case QUEEN: + cout << "q"; + break; + case ROOK: + cout << "r"; + break; + case KNIGHT: + cout << "n"; + break; + case BISHOP: + cout << "b"; + break; + default: + assert(false && "Unexepted promotion type"); + } + } println(); cout.flush(); -- cgit v1.2.3