Take the attempts variable from the main file (cannonball.pde) and move it into the Player class (player.pde). Make it private with an accessors function (getAttempts()). Then add a function to decrement the player's attempts.
Use this new variable throughout the main program instead of the current global one.
I managed to swap the functionality to the player class, however, it broke the target class.
Also, I'm having trouble getting the balls to update properly.
Take the attempts variable from the main file (cannonball.pde) and move it into the Player class (player.pde). Make it private with an accessors function (getAttempts()). Then add a function to decrement the player's attempts.
Use this new variable throughout the main program instead of the current global one.
This assignment should be comparatively easy.