Robby Project 13
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 13: We want to extend Robby's ability to move a certain number of spaces with one command. We will be writing the move(spaces) function. Later, we could instruct Robby move(5) which would move him 5 spaces in the direction he is facing.
function moveSpaces(numSpaces)
{
//your code will be implemented here
}
Note: If your code works for 5 test cases in a row, you can enter your e-mail address.