Properly handle checking for opponent pieces in pawn generate move function