Robby Project 17


Robby now has ten abilities:

turnLeft()

turnRight()

move()

pickFruit()

dropFruit()

hasFruitLeft()   

alreadyFruitHere()  

moveSpaces(numSpaces)

pickAllFruit()

dropAllFruit()

Project 17:  Robby begins at (0, 0) facing East with 0 pieces of fruit.  There are 10 stacks of fruit along the positive side of the x-axis (coordinates from (1, 0) to (10, 0) as shown below).  The number of fruit pieces at every location is different (randomly generated).  You should provide the instructions for Robby to pick up all pieces of fruit along the row.

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