Get outta here!

Get outta here! Get out of the labyrinth! Given is a 8×8 map like this:

S: is where you start, at start your position is that you are looking to north
E: is where you have to go to
1: is an obstacle

What you can do

F; Move forward
R: Turn right (90°)
L: Turn left(90°)

Your algorithm has to find a way form S to E, if you can not move to E you have to indicate this. The map is given from STDIN in this form:

A possible solution for the map above could be:

About The Author

Related posts

To post sourcecode please use <code>..</code> tags.

Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to toolbar