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/board/board.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/board/board.cpp') diff --git a/src/board/board.cpp b/src/board/board.cpp index faabfac..7084c9d 100644 --- a/src/board/board.cpp +++ b/src/board/board.cpp @@ -6,8 +6,8 @@ #include #include "board.hpp" +#include "hash.hpp" #include "moves.hpp" -#include "zobrist.hpp" int PositionToIndex(Position i) { return (i.rank * 8) + i.file; } @@ -176,7 +176,7 @@ Undo MakeMove(uint16_t move, Game *g) { undo.OldBlackCastleKing = g->blackCastleKing; undo.OldBlackCastleQueen = g->blackCastleQueen; - undo.ZobristKey = g->hash; + undo.Hash = g->hash; // play move Piece movingPiece = g->pieces[fromSquare]; @@ -448,5 +448,5 @@ void UndoMove(Undo undo, Game *g) { g->PieceBitboard = g->WhitePieceBitboard | g->BlackPieceBitboard; - g->hash = undo.ZobristKey; + g->hash = undo.Hash; }; -- cgit v1.2.3