aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent8bad9b3bff87d63cb4bfa1c7ae4b974c5fd46f95 (diff)
fixing the hell of a bug
Diffstat (limited to 'src')
-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) {