aboutsummaryrefslogtreecommitdiff
path: root/src/moves.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-07-28 15:33:28 +0200
committerAdam <adammegarules1@gmail.com>2026-07-28 15:33:28 +0200
commitdaf87292ef5e3bcff63b4afb3dfa7d903b24b63d (patch)
treead8fcddb5e1b881152a188b7cb3d109b372f41e3 /src/moves.cpp
parent8bad9b3bff87d63cb4bfa1c7ae4b974c5fd46f95 (diff)
fixing the hell of a bug
Diffstat (limited to 'src/moves.cpp')
-rw-r--r--src/moves.cpp1
1 files changed, 1 insertions, 0 deletions
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<Move> 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) {