INTRODUCTION
The program check condition. If it is false the robot make instruction in loop. When the condition became true the program make the next instruction after the loop.
The robot runs when it is far away from the wall - the condition is false. But, when robot gets closer to wall, the condition become true and the robot stops.