Jump to content

Recommended Posts

Posted
Solved with one repeat forever loop and one if then else. Toms thing about turning left is an important clue:p

Same here, awesome little diversion :D

Posted

*** SPOILER *****

 

This is how I did it , more then likely a messy way of doing it but it seemed to work

 

Repeat While Not wall ahead

Do Move Forward

+ If not wall to the right then

turn right

turn right

+ if not wall to the left then

turn left

Move Forward

 

Tried to upload a screen grab but wouldn't let me

Posted (edited)

Done it now, so much easier when you know all the commands available to you... *grumble*

 

blocklyMaze.png

 

Which is pretty much the same as Tom's, but with the evil of a nested if. sparkeh's looks neatest so far, I reckons.

 

And no I have not just been doing this all morning :p although I am clearly out of practice at my algorithms.

Edited by sonofsanta
split subject/verb! the horror
Posted

Heres how i did it:

 

Repeat forever

--if not wall ahead

----move forward

----turn left

--else

----turn right

--end if

end do

 

I didnt know you can change the wall ahead LOL

  • Thanks 1
Posted
My issue was I could make a script so he got to the end but hypothetically if the map was reversed he would get caught in the loop. So would these answers still work if you were given a mystery map, especially if you think about the island problem with wall following. Or am I over thinking the problem as usual?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...