GDI Lab
Start a new project called GDI in a Labs folder on the k drive
copy the bouncing ball code into your project
compile it and get it to run
Modify the code to:
add keyboard handlers for:
F & S keys to control the speed of the ball (F = faster, S = slower)
B & L keys to make the ball B = bigger or L = littler
add a mouse event handler to capture click events, the user scores points for clicking on a moving ball
if a user clicks on a ball points are scored, the ball disappears and starts over in a random location
add a timer to the pgm
the timer starts when the ball appears
the # of points score decrease from 5 to 0 depending on how long it takes to click on the ball
after 5 seconds the ball disappears and starts over
display the player score
Advanced
if the mouse is clicked on the ball it pops and two new balls appear in a random locations
clearly, your author should have built a ball class!
play continues until 5 balls disappear w/o being clicked on
add a time display that shows the total elapsed time for the game