From 009c245757fc1ebbaa0212f89a4147d21d8b47e5 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 30 Jul 2026 09:03:09 +0200 Subject: adding board print --- src/uci.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index 3c72db0..70bf648 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -8,7 +8,9 @@ #include #include #include +#include #include +#include #include #include @@ -118,6 +120,20 @@ void Uci() { cout << "done\n"; cout.flush(); } + if (cmd == "board") { + for (int i = 0; i < 64; i++) { + Piece piece = game.pieces[i]; + if (piece.type == NONEPIECE) { + cout << " --- "; + continue; + } + printf(" %d%d", piece.type, piece.color); + if (i % 8 == 0) { + println(); + } + } + cout.flush(); + } if (cmd == "load") { LoadTable("cache/positions.txt", &transpositions); cout << "done\n"; -- cgit v1.2.3