considering the loop (go to Y_MIN after Y_MAX) for determining which pedestrian can be seen