• Log in or sign up for an account here: https://www.sythe.org/login

Programming Fundamentals [Coding]

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

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
 
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:

KleJorJ.png
 
Sythe RSPS Player
<3 n4n0
Homosex
Le Monkey
Potamus
Wait, do you not have an Archer rank?
Try taking a look at the A* algorithm, I'd love to help you, but I'm gonna start my assignments on AI next week :(
 
It would get stuck in this scenario:

KleJorJ.png

You're right it would. But I don't think the mazes are going to have loops because in the instructions it says you can implement the right hand rule which would have the same problem.
 
MushyMuncher
Two Factor Authentication User
Christmas 2014
Christmas 2015
Easter 2016
Extreme Homosex
Homosex
Lawrence
Pizza Muncher
Sythe's 10th Anniversary
SytheSteamer
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

Last time I'm gonna say it, it's for a different question lmao
 
Runescape Gamblingrunescape gambling
Back
Top