diff options
Diffstat (limited to 'src/board')
| -rw-r--r-- | src/board/board.cpp | 6 | ||||
| -rw-r--r-- | src/board/board.hpp | 2 |
2 files changed, 4 insertions, 4 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; }; diff --git a/src/board/board.hpp b/src/board/board.hpp index 2b3ac6a..f9947ed 100644 --- a/src/board/board.hpp +++ b/src/board/board.hpp @@ -97,7 +97,7 @@ struct Undo { int oldHalfMoveClock; int oldMoveClock; - uint64_t ZobristKey; + uint64_t Hash; GameState oldState; // castling |
