major correction history | bench 1744326
This commit is contained in:
1 parent
194c3d3bc4
commit
4b3e8020fa
3 files changed
+15
-1
No files matched your search
@@ -37,6 +37,7 @@ void Board::Reset() {
|
||||
hashKey = 0ULL;
|
||||
pawnKey = 0ULL;
|
||||
nonPawnKey = 0ULL;
|
||||
majorKey = 0ULL;
|
||||
}
|
||||
|
||||
void Board::SetByFen(std::string_view fen) {
|
||||
@@ -295,6 +296,10 @@ void Board::SetPiece(int piece, int square, bool color) {
|
||||
pawnKey ^= UTILS::zKeys[color][Pawn][square];
|
||||
} else {
|
||||
nonPawnKey ^= UTILS::zKeys[color][piece][square];
|
||||
|
||||
if (piece == King || piece == Rook || piece == Queen) {
|
||||
majorKey ^= UTILS::zKeys[color][piece][square];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,6 +314,10 @@ void Board::RemovePiece(int piece, int square, bool color) {
|
||||
pawnKey ^= UTILS::zKeys[color][Pawn][square];
|
||||
} else {
|
||||
nonPawnKey ^= UTILS::zKeys[color][piece][square];
|
||||
|
||||
if (piece == King || piece == Rook || piece == Queen) {
|
||||
majorKey ^= UTILS::zKeys[color][piece][square];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user