File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -129,15 +129,15 @@ namespace {
129129 opposed = theirPawns & forward_bb (Us, s);
130130 passed = !(theirPawns & passed_pawn_mask (Us, s));
131131
132- // Test for backward pawn
133- backward = false ;
134-
132+ // Test for backward pawn.
135133 // If the pawn is passed, isolated, or member of a pawn chain it cannot
136134 // be backward. If there are friendly pawns behind on adjacent files
137135 // or if can capture an enemy pawn it cannot be backward either.
138- if ( !(passed | isolated | chain)
139- && !(ourPawns & pawn_attack_span (Them, s))
140- && !(pos.attacks_from <PAWN>(s, Us) & theirPawns))
136+ if ( (passed | isolated | chain)
137+ || (ourPawns & pawn_attack_span (Them, s))
138+ || (pos.attacks_from <PAWN>(s, Us) & theirPawns))
139+ backward = false ;
140+ else
141141 {
142142 // We now know that there are no friendly pawns beside or behind this
143143 // pawn on adjacent files. We now check whether the pawn is
You can’t perform that action at this time.
0 commit comments