diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-28 15:01:59 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-28 15:01:59 +0200 |
| commit | 5081cd26548a090ebd59ab26a16ea084470c4080 (patch) | |
| tree | 11fc083306813076256d00c0fcd18a412d9d62a7 /src/board.cpp | |
| parent | 530b81fb80159b68598d4b974924d2206f7c9d6a (diff) | |
improving bot
Diffstat (limited to 'src/board.cpp')
| -rw-r--r-- | src/board.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/board.cpp b/src/board.cpp index f78d429..e49aaf7 100644 --- a/src/board.cpp +++ b/src/board.cpp @@ -41,12 +41,8 @@ void printBoard(Game *b) { std::string whiteLetters = " a b c d e f g h \n"; std::string blackLetters = " h g f e d c b a \n"; - // const char *lightSquare = "\033[48;5;145m"; - // // const char *darkSquare = "\033[48;5;28m"; - // const char *lightSquare = "\033[48;5;240m"; // Dark gray - // const char *darkSquare = "\033[48;5;22m"; // Forest green - const char *lightSquare = "\033[48;5;245m"; // Medium gray - const char *darkSquare = "\033[48;5;29m"; // Rich green + const char *lightSquare = "\033[48;5;245m"; + const char *darkSquare = "\033[48;5;29m"; const char *reset = "\033[0m"; std::cout << (b->turn ? whiteLetters : blackLetters); @@ -98,7 +94,7 @@ void printBoard(Game *b) { 8 - (int)b->enPassant.rank); std::printf("Move clock: %d\n", b->MoveClock); std::printf("Half move clock: %d\n", b->halfMoveClock); - std::printf("Board Eval: %f\n", EvaluateBoardForWhite(b)); + std::printf("Board Eval: %f\n", EvaluateBoardForWhite(b, 0)); } void PlayMove(Move move, Game *b) { @@ -241,12 +237,12 @@ UndoMove MakeMove(Move move, Game *g) { undo.zobristKey = key; - g->ThreeFoldMap[key]++; - if (g->ThreeFoldMap[key] >= 3) { g->state = DRAW; } + g->ThreeFoldMap[key]++; + if (g->halfMoveClock >= 50) { g->state = DRAW; } |
