X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=7eb584d2e8f37c5c8e49b507515bc7ba2c0657d5;hp=a9fc92b25b937b51ca429764a3d30660049db143;hb=ea5505821dabb70eb01cc25f7b4489b0fdc17d2b;hpb=79c97625a42c131708af953839900aff31102454 diff --git a/src/pawns.cpp b/src/pawns.cpp index a9fc92b2..7eb584d2 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -96,7 +96,7 @@ namespace { // Flag the pawn opposed = theirPawns & forward_file_bb(Us, s); - stoppers = theirPawns & passed_pawn_mask(Us, s); + stoppers = theirPawns & passed_pawn_span(Us, s); lever = theirPawns & PawnAttacks[Us][s]; leverPush = theirPawns & PawnAttacks[Us][s + Up]; doubled = ourPawns & (s - Up); @@ -114,8 +114,8 @@ namespace { // which could become passed after one or two pawn pushes when are // not attacked more times than defended. if ( !(stoppers ^ lever ^ leverPush) - && popcount(support) >= popcount(lever) - 1 - && popcount(phalanx) >= popcount(leverPush)) + && (support || !more_than_one(lever)) + && popcount(phalanx) >= popcount(leverPush)) e->passedPawns[Us] |= s; else if ( stoppers == SquareBB[s + Up]