- // Note that we are sure to find something because pawn is not passed
- // nor isolated, so loop is potentially infinite, but it isn't.
- while (!(b & (ourPawns | theirPawns)))
- b = shift_bb<Up>(b);
-
- // The friendly pawn needs to be at least two ranks closer than the
- // enemy pawn in order to help the potentially backward pawn advance.
+ // If we have an enemy pawn in the same or next rank, the pawn is
+ // backward because it cannot advance without being captured.