HTML and CSS Reference
In-Depth Information
In version two of the game, the card fronts display photographs of people rather than polygons. And note
that although many memory games consider images to be the same only if theyre completely identical,
this one is similar to a 2 of Hearts matching a 2 of Diamonds in a deck of playing cards. To illustrate a
programming point, well define a match as the same person , even in differing pictures. This requires a
method of encoding the information we use to determine matching states. Version two of the game also
demonstrates writing text on the canvas, as you can see in Figure 5-5, which depicts the opening screen.
Figure 5-5. The memory game, version two, opening screen
To see one possible result of clicking on two cards in our new game, look at Figure 5-6.
Figure 5-6. This screen shows non-matching photos.
Search WWH ::




Custom Search