mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Move pawn_attacks_bb() helper to bitboard.h
No functional change.
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user