Adblock breaks this site

Programming Fundamentals [Coding]

Discussion in 'Homework Help' started by Jeff, Mar 16, 2015.

  1. Avenue

    Avenue Forum Addict
    Banned

    Joined:
    Oct 21, 2014
    Posts:
    302
    Referrals:
    0
    Sythe Gold:
    3
    Programming Fundamentals [Coding]

    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.
     
  2. 70i

    70i Forum Addict
    Banned

    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174
    Programming Fundamentals [Coding]

    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
     
  3. Avenue

    Avenue Forum Addict
    Banned

    Joined:
    Oct 21, 2014
    Posts:
    302
    Referrals:
    0
    Sythe Gold:
    3
    Programming Fundamentals [Coding]

    It would get stuck in this scenario:

    [​IMG]
     
  4. Lured Yah

    Lured Yah Get Fire Capes and swap GP at www.Sparta.rs
    Lured Yah Donor

    Joined:
    Mar 10, 2009
    Posts:
    4,127
    Referrals:
    16
    Sythe Gold:
    13
    Sythe RSPS Player Wait, do you not have an Archer rank? Le Monkey <3 n4n0 Homosex Potamus
    Programming Fundamentals [Coding]

    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 :(
     
  5. 70i

    70i Forum Addict
    Banned

    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174
    Programming Fundamentals [Coding]

    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.
     
  6. Jeff

    Jeff Previously named: Jeff.

    Joined:
    Apr 16, 2011
    Posts:
    11,423
    Referrals:
    26
    Sythe Gold:
    3,185
    Two Factor Authentication User MushyMuncher Christmas 2014 Christmas 2015 Easter 2016 Sythe's 10th Anniversary Pizza Muncher Homosex Extreme Homosex SytheSteamer
    Lawrence
    Programming Fundamentals [Coding]

    Last time I'm gonna say it, it's for a different question lmao
     
< [Help]Grade 12 English Work[Easy Money] | Help with some simple mean, averages, ect >


 
 
Adblock breaks this site