In this column we'll lead you through the design and implementation of the Memory game script, emphasizing the demonstrated usage of frames. The script includes ten functions and a global-variables section. We'll go through each one of them and explain their content in detail. In particular, we'll show you:
- How to design the overall structure of the game using frames.
- How to set the global variables section.
- How to initialize the game board before the game.
- How to handle mouse clicks.
- How to reveal a card.
- How to remove and cover back a card.
- How to write the frames.
Produced by Yehuda Shiran and Tomer Shiran
Created: April 5, 1999
Revised: April 5, 1999