From 03437563f91a6f760fa8b0283e2e74586a9c7dac Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Jul 2026 13:43:55 +0200 Subject: implementing draw --- src/repl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/repl.cpp') diff --git a/src/repl.cpp b/src/repl.cpp index 76f921e..8eae719 100644 --- a/src/repl.cpp +++ b/src/repl.cpp @@ -34,6 +34,13 @@ int startREPL(Board *b) { std::println(); return 0; } + if (b->state == DRAW) { + printBoard(b); + std::println(); + std::cout << "\033[1mDraw\033[0m" << "\n"; + std::println(); + return 0; + } if (b->state == WHITE_WON) { printBoard(b); std::cout << "\033[1mChechmate White won\033[0m" << "\n"; @@ -45,7 +52,7 @@ int startREPL(Board *b) { return 0; } if (b->state == TURN) { - if (!b->turn) { + if (b->turn == false) { auto moves = GetLegalMoves(b); std::srand( std::time(0)); // use current time as seed for random generator -- cgit v1.2.3