repeat: forever do -> turn left -> repeat while: wall ahead -> do -> turn right -> move forward
Would solve any maze, following the logic that if you hold your left hand to the wall of a maze, and continue walking, you will find the exit. (Not the most efficient solution.)
repeat: forever
ReplyDeletedo -> turn left
-> repeat while: wall ahead
-> do -> turn right
-> move forward
Would solve any maze, following the logic that if you hold your left hand to the wall of a maze, and continue walking, you will find the exit. (Not the most efficient solution.)
Seems some whitespace was removed there... Makes it a little harder to read...
ReplyDeletehttp://imgur.com/7a7NI