aboutsummaryrefslogtreecommitdiff
path: root/src/moves.cpp
diff options
context:
space:
mode:
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) {