From fa53cfa52d92d9306cd6f8bd227147ab0d4c2611 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 20 Aug 2026 10:41:26 +0200 Subject: refactor(hash): refactoring hash logic to be better --- src/uci.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index 6e30014..e65bf73 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -15,10 +15,10 @@ #include "board/fen.hpp" #include "book.hpp" #include "bot.hpp" +#include "hash.hpp" #include "misc.hpp" #include "moves.hpp" #include "uci.hpp" -#include "zobrist.hpp" static const std::string starting_fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"; @@ -94,7 +94,7 @@ Game initBoard( setBoardFen(startingFEN, &g); - uint64_t key = GenerateZobristKey(&g); + uint64_t key = GenerateHashFromScratch(&g); g.history.push_back(key); g.hash = key; @@ -349,7 +349,7 @@ void Uci() { movesCommnad(&game); } if (cmd == "hash") { - uint64_t hash = GenerateZobristKey(&game); + uint64_t hash = GenerateHashFromScratch(&game); std::cout << hash << "\n"; } } -- cgit v1.2.3