Graphic JavaScript


Back to index
Collision Detection

Your browser does not support the HTML5 canvas tag.

ASSIGNMENT:

Test out this applet carefully and check out the code thoroughly. In particular, figure out the purpose of all the variables. For instance, what is the purpose of cdone? Once you understand the applet completely, you will be ready to make the following alterations to the applet:

  1. Declare a winner after the tenth round
  2. To start a new game the user presses the ENTER key
  3. Scoring stops when the game is over and resets and resumes when a new game starts
  4. Provide full instructions to the user within the applet area