rewrite backward pawn code

Use backmost piece instead of loops.
No functional change.