diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-30 16:40:17 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-30 16:40:17 +0200 |
| commit | 8df9e390a71eeb2835eab06ec4b474c8cad63ecd (patch) | |
| tree | 4788195fc373baa22bb349f1532e62d3db9dc99b /src/moves.cpp | |
| parent | 72646d9beb20e338569d578fee38a37be06faabe (diff) | |
improving bot
Diffstat (limited to 'src/moves.cpp')
| -rw-r--r-- | src/moves.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/moves.cpp b/src/moves.cpp index d5ad989..4deafe3 100644 --- a/src/moves.cpp +++ b/src/moves.cpp @@ -164,12 +164,11 @@ std::vector<Move> GetLegalMoves(Game *g) { } } - return legalMoves; + return legalMoves; } GameState GetNewGameState(Game *g) { // make sure we dont override game ending states - if (g->state == DRAW || g->state == STALEMATE || g->state == WHITE_WON || - g->state == BLACK_WON) { + if (g->state == DRAW || g->state == WHITE_WON || g->state == BLACK_WON) { return g->state; } if (g->halfMoveClock >= 50) { @@ -186,7 +185,7 @@ GameState GetNewGameState(Game *g) { if (check) { g->state = g->turn ? BLACK_WON : WHITE_WON; } else { - g->state = STALEMATE; + g->state = DRAW; } } return g->state; |
