How can I translate this statement below into an algorithm. thanks.
If the car reaches the edge of the wall on the east OR on the West side
the car goes backwards a short distance
then, the car turns to a random direction AND go forward
If the car reaches the edge of the wall on the North OR on the south side
the car goes backwards a short distance, then
then,the car turns to a random direction AND go forward