From 8e47b8f9f8a017f25a1c9a9baba05b0bf9b12d2d Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 16 Aug 2026 11:22:34 +0200 Subject: perf(draw) instead of having a hash map for three fold repetion check now we have --- src/uci.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index ff8bc33..b78ffea 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -66,20 +66,20 @@ uint16_t UciToMove(const std::string &uci) { Game initBoard( const std::string &startingFEN, std::unordered_map *transPositions) { - Game b{}; - b.enPassant = IndexToPosition(0); // default value - b.canEnpassant = false; - b.state = TURN; - b.turn = true; - b.halfMoveClock = 0; - b.MoveClock = 0; - b.Transpositions = transPositions; - - setBoardFen(startingFEN, &b); - - uint64_t key = GenerateZobristKey(&b); - b.ThreeFoldMap[key] = 1; - return b; + Game g{}; + g.enPassant = IndexToPosition(0); // default value + g.canEnpassant = false; + g.state = TURN; + g.turn = true; + g.halfMoveClock = 0; + g.MoveClock = 0; + g.Transpositions = transPositions; + + setBoardFen(startingFEN, &g); + + uint64_t key = GenerateZobristKey(&g); + g.history.push_back(key); + return g; }; static void PrintBitboard(uint64_t bb, const std::string &name) { std::cout << name << "\n"; -- cgit v1.2.3