From 5081cd26548a090ebd59ab26a16ea084470c4080 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 28 Jul 2026 15:01:59 +0200 Subject: improving bot --- src/board.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/board.cpp') 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; } -- cgit v1.2.3