From 27e879c62ecc019591201b1b1068b0c41870cfab Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 3 Aug 2026 21:56:36 +0200 Subject: a big hell of a commit --- src/uci.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index 31c4e43..ffab5bc 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -42,10 +42,10 @@ Move UciToMove(const string uci) { Position to; from.file = static_cast(uci[0] - 'a'); - from.rank = static_cast('8' - uci[1]); + from.rank = static_cast(uci[1] - '1'); to.file = static_cast(uci[2] - 'a'); - to.rank = static_cast('8' - uci[3]); + to.rank = static_cast(uci[3] - '1'); return {from, to}; } @@ -181,8 +181,8 @@ void Uci() { Move best = GetBestMove(&game, depth); cout << "bestmove "; - cout << static_cast(best.From.file + 'a') << 8 - best.From.rank - << static_cast(best.To.file + 'a') << 8 - best.To.rank; + cout << static_cast(best.From.file + 'a') << 1 + best.From.rank + << static_cast(best.To.file + 'a') << 1 + best.To.rank; if (best.promotion != NONEPIECE) { switch (best.promotion) { -- cgit v1.2.3