20. Ball Driving
You move a little ball around the screen by positioning your mouse inside the control center in the upper right corner of the screen. The position of the mouse relative to the “origin” of the axes in the control center detemines which way the ball will move (and how far). Motion is caused by mouse-events, so the ball does not move unless you are moving or clicking the mouse. When the ball is entirely inside the target circle, the game is over and you win.
Starter code so everyone begins from the same spot.
The basics of the control grid in the upper right.
Actually moving the point according to the mouse position in the control grid.
The game ends when the ball is completely inside the target.
The functions to use with big-bang: draw handler, mouse handler.
2. Starter Code
Starter code so everyone begins from the same spot.
3. Controls
The basics of the control grid in the upper right.
4. Motion
Actually moving the point according to the mouse position in the control grid.
5. End Game
The game ends when the ball is completely inside the target.
6. Animation
The functions to use with big-bang: draw handler, mouse handler.