aboutsummaryrefslogtreecommitdiff
path: root/src/board/board.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-20 10:41:26 +0200
committerAdam <adammegarules1@gmail.com>2026-08-20 10:41:26 +0200
commitfa53cfa52d92d9306cd6f8bd227147ab0d4c2611 (patch)
tree9e12a2ffeca15804acb1a2bf53f8b721d1b997c5 /src/board/board.cpp
parentd10a05eb92423777c6ff32edd14a1bea32214801 (diff)
refactor(hash): refactoring hash logic to be better
Diffstat (limited to 'src/board/board.cpp')
-rw-r--r--src/board/board.cpp6
1 files changed, 3 insertions, 3 deletions
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 <iostream>
#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;
};