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:
Marco Costalba
2012-04-14 09:16:34 +01:00
parent 25a9b601b2
commit f59323b56a
8 changed files with 67 additions and 68 deletions

View File

@@ -710,7 +710,7 @@ ScaleFactor Endgame<KBPKB>::operator()(const Position& pos) const {
return SCALE_FACTOR_DRAW;
else
{
Bitboard path = squares_in_front_of(strongerSide, pawnSq);
Bitboard path = forward_bb(strongerSide, pawnSq);
if (path & pos.pieces(KING, weakerSide))
return SCALE_FACTOR_DRAW;