CS108 Lab 9: Keyboard and Ball Games
Due Thursday, April 4, at 3:30 PM
Add keyboard controls to the ball game from class, so that:
- c turns on/off clearing the screen
- d disconnects the string, leaving the ball to move freely
- r places the ball on the mouse cursor, and sets velocity in both directions to 0. You can use mouseX and mouseY in the keyPressed function.
To do this, you'll need a keyPressed function. Check the "key" special variable to see which key is currently pressed.
Demos: Tuesday Thursday.