diff options
| -rw-r--r-- | src/uci.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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 <cassert> #include <cctype> #include <cstdint> +#include <cstdio> #include <iostream> +#include <print> #include <sstream> #include <string> @@ -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"; |
