Robby Project 10


Robby now has seven abilities:

turnLeft()

turnRight()

move()

pickFruit()

dropFruit()

hasFruitLeft()   

This method returns true if Robby has at least 1 piece of fruit; false otherwise.

alreadyFruitHere()  

This method returns true if there is at least 1 piece of fruit on the graph where Robby is standing; false otherwise.

Project 10:  There is a mystery stack of fruit somewhere on the graph.  The stack is at x = 8.  We also know that the y-coordinate of the stack is a positive number.  Robby starts at (0, 0) facing East.  You want to give Robby directions to find the stack of fruit and pick up the pieces on the stack.

For example, there may be 17 pieces of fruit at location (8, 5).  You would need to provide the directions to pick up all 17 pieces of fruit.  

Your instructions should work for any scenario described above as the number of fruit and the y-coordinate vary randomly. 

Note: If your code works for 5 test cases in a row, you can enter your e-mail address.