X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=86c4b8ef2520eba9a1b64bf231ca93e5f2aadc16;hp=9755c2ec2e0e20258f046610797efb40a40c65e7;hb=d980d7c0d4b2efe7abe26bdd094859f6d888ee60;hpb=9d3a2ecaa22cb55bddef0e932f2b2951cf6cacf5 diff --git a/src/pawns.cpp b/src/pawns.cpp index 9755c2ec..86c4b8ef 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -70,7 +70,7 @@ namespace { constexpr Color Them = (Us == WHITE ? BLACK : WHITE); constexpr Direction Up = (Us == WHITE ? NORTH : SOUTH); - Bitboard b, neighbours, stoppers, doubled, support, phalanx; + Bitboard neighbours, stoppers, doubled, support, phalanx; Bitboard lever, leverPush; Square s; bool opposed, backward, passed; @@ -145,11 +145,10 @@ namespace { score -= Doubled; } - // Penalize the unsupported and non passed pawns attacked twice by the enemy - b = ourPawns - & doubleAttackThem - & ~(e->pawnAttacks[Us] | e->passedPawns[Us]); - score -= WeakLever * popcount(b); + // Penalize our unsupported pawns attacked twice by enemy pawns + score -= WeakLever * popcount( ourPawns + & doubleAttackThem + & ~e->pawnAttacks[Us]); return score; }