mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Introduce another two (bitboard,square) operators
And simplify the code. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1410,13 +1410,11 @@ split_point_start: // At split points actual search starts from here
|
||||
|
||||
// Case 5: Discovered check, checking piece is the piece moved in m1
|
||||
ksq = pos.king_square(pos.side_to_move());
|
||||
if (piece_is_slider(p1) && (squares_between(t1, ksq) & f2))
|
||||
{
|
||||
Bitboard occ = pos.occupied_squares();
|
||||
occ ^= f2;
|
||||
if (pos.attacks_from(p1, t1, occ) & ksq)
|
||||
return true;
|
||||
}
|
||||
if ( piece_is_slider(p1)
|
||||
&& (squares_between(t1, ksq) & f2)
|
||||
&& (pos.attacks_from(p1, t1, pos.occupied_squares() ^ f2) & ksq))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user