From f1ded0290393709d437c6e149861ceb91d241c64 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Jul 2026 18:57:09 +0200 Subject: fixing king captuare bug --- src/moves.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/moves.cpp b/src/moves.cpp index 81ea1df..9c7991a 100644 --- a/src/moves.cpp +++ b/src/moves.cpp @@ -130,7 +130,6 @@ std::vector GetLegalMoves(Board *b) { bool isLegal = true; Board testBoard = *b; PlayMove(move, &testBoard); - testBoard.turn = !testBoard.turn; auto opponentResponse = GetPseudoLegalMoves(&testBoard); for (Move move : opponentResponse) { if (testBoard.pieces[PositionToIndex(move.To)].type == KING) { @@ -145,7 +144,6 @@ std::vector GetLegalMoves(Board *b) { bool isCheck = false; Board 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