mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Update castling rights unconditionally.
passed STC: LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 163680 W: 42214 L: 42137 D: 79329 Ptnml(0-2): 454, 18054, 44734, 18157, 441 https://tests.stockfishchess.org/tests/view/697e6f4e5f56030af97b5a3c closes https://github.com/official-stockfish/Stockfish/pull/6588 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
2321cf2f77
commit
24af6a6bc4
+4
-7
@@ -819,13 +819,10 @@ void Position::do_move(Move m,
|
||||
st->epSquare = SQ_NONE;
|
||||
}
|
||||
|
||||
// Update castling rights if needed
|
||||
if (st->castlingRights && (castlingRightsMask[from] | castlingRightsMask[to]))
|
||||
{
|
||||
k ^= Zobrist::castling[st->castlingRights];
|
||||
st->castlingRights &= ~(castlingRightsMask[from] | castlingRightsMask[to]);
|
||||
k ^= Zobrist::castling[st->castlingRights];
|
||||
}
|
||||
// Update castling rights.
|
||||
k ^= Zobrist::castling[st->castlingRights];
|
||||
st->castlingRights &= ~(castlingRightsMask[from] | castlingRightsMask[to]);
|
||||
k ^= Zobrist::castling[st->castlingRights];
|
||||
|
||||
// Move the piece. The tricky Chess960 castling is handled earlier
|
||||
if (m.type_of() != CASTLING)
|
||||
|
||||
Reference in New Issue
Block a user