The Memory (aka Concentration) Game

  • Jeannie Meyer


In this example, you learned how to implement two versions of the game known as memory or concentration) using programming techniques and HTML5 features. These included
  • examples of programmer-defined functions and programmer-defined objects

  • how to draw polygons on the canvas using moveTo and lineTo along with Math trig methods

  • guidance on how to use a form to show information to players

  • a method for drawing text with a specified font on the canvas

  • instructions about how to draw images on the canvas

  • using setTimeout to force a pause

  • employing Date objects to compute elapsed time

The applications demonstrated ways to represent information to implement two versions of a familiar game. The next chapter will temporarily depart from the use of canvas to demonstrate dynamic creation and positioning of HTML elements. It also will feature the use of HTML5’s video element.


Elapse Time Image File Event Handling Draw Method Photo Version 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© by Jeanine Meyer 2010

Authors and Affiliations

  • Jeannie Meyer

There are no affiliations available

Personalised recommendations