diff options
Diffstat (limited to 'src/uci.cpp')
| -rw-r--r-- | src/uci.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/uci.cpp b/src/uci.cpp index 92c7072..f435a06 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -145,12 +145,15 @@ static void printPromotionLetter(PieceType p) { assert(false && "Unexpected promotion type"); } } -static void printBoard(Game *g) { +/* + * Prints nice looking board + */ +static void printBoard(const Game &g) { for (int rank = 7; rank >= 0; --rank) { std::print("{0} |", rank + 1); for (int file = 0; file < 8; file++) { - Piece piece = g->pieces[(rank * 8) + file]; + Piece piece = g.pieces[(rank * 8) + file]; if (piece.type == NONEPIECE) { std::print(" 00"); @@ -277,7 +280,7 @@ void Uci() { return; } if (cmd == "board") { - printBoard(&game); + printBoard(game); } if (cmd == "bits") { DebugBitboards(&game); |
