minor corrhist | bench 1999623
This commit is contained in:
1 parent
b2a475ff5f
commit
636791576d
3 files changed
+15
-1
No files matched your search
@@ -38,6 +38,7 @@ void Board::Reset() {
|
||||
pawnKey = 0ULL;
|
||||
nonPawnKey = 0ULL;
|
||||
majorKey = 0ULL;
|
||||
minorKey = 0ULL;
|
||||
}
|
||||
|
||||
void Board::SetByFen(std::string_view fen) {
|
||||
@@ -300,6 +301,10 @@ void Board::SetPiece(int piece, int square, bool color) {
|
||||
if (piece == King || piece == Rook || piece == Queen) {
|
||||
majorKey ^= UTILS::zKeys[color][piece][square];
|
||||
}
|
||||
|
||||
if (piece == King || piece == Bishop || piece == Knight) {
|
||||
minorKey ^= UTILS::zKeys[color][piece][square];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,6 +323,10 @@ void Board::RemovePiece(int piece, int square, bool color) {
|
||||
if (piece == King || piece == Rook || piece == Queen) {
|
||||
majorKey ^= UTILS::zKeys[color][piece][square];
|
||||
}
|
||||
|
||||
if (piece == King || piece == Bishop || piece == Knight) {
|
||||
minorKey ^= UTILS::zKeys[color][piece][square];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user