#include "position.h"
#include "thread.h"
+namespace Stockfish {
+
namespace {
#define V Value
e->blockedCount += popcount(shift<Up>(ourPawns) & (theirPawns | doubleAttackThem));
// Loop through all pawns of the current color and score each pawn
- while (b) {
- s = pop_lsb(&b);
+ while (b)
+ {
+ s = pop_lsb(b);
assert(pos.piece_on(s) == make_piece(Us, PAWN));
if (pawns & attacks_bb<KING>(ksq))
minPawnDist = 1;
else while (pawns)
- minPawnDist = std::min(minPawnDist, distance(ksq, pop_lsb(&pawns)));
+ minPawnDist = std::min(minPawnDist, distance(ksq, pop_lsb(pawns)));
return shelter - make_score(0, 16 * minPawnDist);
}
template Score Entry::do_king_safety<BLACK>(const Position& pos);
} // namespace Pawns
+
+} // namespace Stockfish