Move pawn_attacks_bb() helper to bitboard.h

No functional change.
This commit is contained in:
Stéphane Nicolet
2018-02-21 22:31:38 +01:00
parent 820c5c25b6
commit 52f92d05a9
4 changed files with 13 additions and 12 deletions

View File

@@ -88,8 +88,8 @@ namespace {
template<Color Us>
Score evaluate(const Position& pos, Pawns::Entry* e) {
const Color Them = (Us == WHITE ? BLACK : WHITE);
const Direction Up = (Us == WHITE ? NORTH : SOUTH);
const Color Them = (Us == WHITE ? BLACK : WHITE);
const Direction Up = (Us == WHITE ? NORTH : SOUTH);
Bitboard b, neighbours, stoppers, doubled, supported, phalanx;
Bitboard lever, leverPush;
@@ -104,7 +104,7 @@ namespace {
e->passedPawns[Us] = e->pawnAttacksSpan[Us] = e->weakUnopposed[Us] = 0;
e->semiopenFiles[Us] = 0xFF;
e->kingSquares[Us] = SQ_NONE;
e->pawnAttacks[Us] = pos.pawn_attacks<Us>(ourPawns);
e->pawnAttacks[Us] = pawn_attacks_bb<Us>(ourPawns);
e->pawnsOnSquares[Us][BLACK] = popcount(ourPawns & DarkSquares);
e->pawnsOnSquares[Us][WHITE] = pos.count<PAWN>(Us) - e->pawnsOnSquares[Us][BLACK];