aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bot.cpp1
-rw-r--r--src/moves.cpp1
2 files changed, 2 insertions, 0 deletions
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 <algorithm>
#include <cassert>
#include <cmath>
+#include <iostream>
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<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) {