mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Use more_than_one() instead of single_bit()
It is more correct given what the function does. In particular single_bit() returns true also in case of empty bitboards. Of course also the usual renaming while there :-) No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -410,7 +410,7 @@ MoveStack* generate<MV_EVASION>(const Position& pos, MoveStack* mlist) {
|
||||
// If queen and king are far or not on a diagonal line we can safely
|
||||
// remove all the squares attacked in the other direction becuase are
|
||||
// not reachable by the king anyway.
|
||||
if (squares_between(ksq, checksq) || !(PseudoAttacks[BISHOP][checksq] & ksq))
|
||||
if (between_bb(ksq, checksq) || !(PseudoAttacks[BISHOP][checksq] & ksq))
|
||||
sliderAttacks |= PseudoAttacks[QUEEN][checksq];
|
||||
|
||||
// Otherwise we need to use real rook attacks to check if king is safe
|
||||
@@ -434,7 +434,7 @@ MoveStack* generate<MV_EVASION>(const Position& pos, MoveStack* mlist) {
|
||||
return mlist;
|
||||
|
||||
// Blocking evasions or captures of the checking piece
|
||||
target = squares_between(checksq, ksq) | checkers;
|
||||
target = between_bb(checksq, ksq) | checkers;
|
||||
|
||||
mlist = (us == WHITE ? generate_pawn_moves<WHITE, MV_EVASION>(pos, mlist, target)
|
||||
: generate_pawn_moves<BLACK, MV_EVASION>(pos, mlist, target));
|
||||
|
||||
Reference in New Issue
Block a user