This is for a different question lmao
Now hop off your high horse xDDD
He's right though, you'll learn more from it that way. Post your question here and how you think it can be done, I'm pretty sure many of us are willing to help you then.
This is for a different question lmao
Now hop off your high horse xDDD
This is for a different question lmao
Now hop off your high horse xDDD
if(tree on right and can move straight)
move ahead
else if(there's no tree on right)
turn right, move
else if(no tree on left and cant move straight)
turn left, move
else
you need to backtrack, turn left twice and move,
call this function again
I don't know why I'm helping you with this. Wasn't as difficult as I originally thought. This should work.
Code:if(tree on right and can move straight) move ahead else if(there's no tree on right) turn right, move else if(no tree on left and cant move straight) turn left, move else you need to backtrack, turn left twice and move, call this function again
It would get stuck in this scenario:
![]()
I don't know why I'm helping you with this. Wasn't as difficult as I originally thought. This should work.
Code:if(tree on right and can move straight) move ahead else if(there's no tree on right) turn right, move else if(no tree on left and cant move straight) turn left, move else you need to backtrack, turn left twice and move, call this function again

