This app is similar to the classic arcade game, Pong. The app uses a canvas, a ball, and an image sprite to mimic pong. To earn points in the game, players must drag the image sprite and not allow the ball to hit the bottom of the screen. Points are earned by hitting the ball with the sprite, but hitting the ball also causes the speed of the ball to increase. The app also features a start button, a reset button, and a sound on/off button.
Reflections
Describe and provide pseudocode for the procedure you defined to keep score (Enhancement #1). Initialize score to 0
Call tinyDB to load highscore
When ball collides with image sprite set score to score plus 1
If score is greater than highscore, set label color to gold
When ball hits edge -1, if score is greater than highscore, set highscore to score
Call tinyDB to store highscore
Describe and provide pseudocode for the algorithm you defined to handle the sound on/off checkbox. Initialize sound to true
When sound button clicked
If sound is false, set sound to true
Else set sound to false
If sound is true, call sound to play (found in code where sound playing occurs)