1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 11:39:15 +00:00

Slightly better condition in update_hidden_checks()

Use a more strict condition to check if we have captured
an opponent pinner or hidden checker.

With this patch the occurrence of checkerCaptured == true are
reduced of 50%.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-02-28 09:42:52 +01:00
parent f9f30412e7
commit a96cba0ec8

View file

@ -713,7 +713,7 @@ void Position::update_hidden_checks(Square from, Square to) {
}
// It is possible that we have captured an opponent hidden checker?
Bitboard checkerCaptured = (st->dcCandidates[them] | st->pinners[us]) && st->capture;
Bitboard checkerCaptured = st->capture && (st->dcCandidates[them] || bit_is_set(st->pinners[us], to));
// If we are moving from/to an our king attack direction and there was/is some possible
// opponent hidden checker then calculate the position otherwise skip because opponent