- // the adjacent files and cannot safely advance. Phalanx and isolated
- // pawns will be excluded when the pawn is scored.
- backward = !(neighbours & forward_ranks_bb(Them, s))
- && (stoppers & (leverPush | (s + Up)));
+ // the adjacent files and cannot safely advance.
+ backward = !(neighbours & forward_ranks_bb(Them, s + Up))
+ && (leverPush | blocked);
+
+ // Compute additional span if pawn is not backward nor blocked
+ if (!backward && !blocked)
+ e->pawnAttacksSpan[Us] |= pawn_attack_span(Us, s);