move forward
turn
catch
procedure {}
if wall
else
END if
repeat
1
END repeat