Collision detection exercise, Hannah Dee

2. A steerable player box with mouse and touch events

This canvas has some boxes, and you have to write the "collides" function which determines when they overlap

  1. Study the code carefully - this time the canvas responds to mouse events and to touch events
  2. If there are things that don't make sense, just ask.
  3. Create an array of boxes that appear on the screen when start_game() is called
  4. Try drawing some images instead of boxes

Total collisions so far: