Buoy List, Boooyyyyy. -
01-11-2014, 06:20 PM
"To determine when the game is over, you need a way to know when all the buoys have been picked up. To track the buoys that have been picked up, create a second world-level list, this one named picked UpBuoys and leave it empty. In the pickUpBuoy method, create a statement that adds the picked up buoy to the pickedUpBuoys list. Create a world-level method named checkIfGameIsOver and call it every time a buoy is picked up. When the size of pickedUpBuoys is equal to seven, the player wins the game and a 3D text object is used to display "You did it!".
Taken from Learning to program with Alice, 3rd Ed. by Wanda P Dann, Stephen Cooper, and Randy Pausch.
So, here's the issue. I've completed the majority of the assignment. Now comes the tricky part, I need to be able to add a +1, to the pickedUpBuoys list whenever I pick up a buoy, and this is driving me insane. Where is my program going wrong, I'd like some perspective, not a laid out list of what to do.
|