From daf87292ef5e3bcff63b4afb3dfa7d903b24b63d Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 28 Jul 2026 15:33:28 +0200 Subject: fixing the hell of a bug --- src/bot.cpp | 1 + src/moves.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/bot.cpp b/src/bot.cpp index ef4a747..90c834a 100644 --- a/src/bot.cpp +++ b/src/bot.cpp @@ -4,6 +4,7 @@ #include #include #include +#include int PAWN_VALUE = 100; int KNIGHT_VALUE = 320; diff --git a/src/moves.cpp b/src/moves.cpp index 9841e4b..638e01a 100644 --- a/src/moves.cpp +++ b/src/moves.cpp @@ -190,6 +190,7 @@ std::vector GetLegalMoves(Game *b) { bool isCheck = false; Game testBoard = *b; + testBoard.turn = !testBoard.turn; auto opponentResponse = GetPseudoLegalMoves(&testBoard); for (Move move : opponentResponse) { if (testBoard.pieces[PositionToIndex(move.To)].type == KING) { -- cgit v1.2.3