CSE 111 - Fall 2002

Lab #10 - Memory Match

 

Background

For this lab, you will build the game of memory match.  This game consists of a grid of 6 x 4 cards.  The user clicks on the cards, which causes them to flip over.  The user tries to match the images on the cards.  If the two cards match, the cards disappear and the user is awarded points (let's say 10).  If the cards do not match, they flip back over and the user loses some points (let's say 2).  The game is over when the user has matched all the cards.

For your implementation, you should find 12 different images for the cards.  You will also need an image for the "back side" of the card as well as an image that represents when the card has been matched and removed from the board.  

You should arrange the cards on the screen.  You will need one variable to hold every card that will be displayed on the screen.  Every time the user loads you page, the images can be at the same place.  You should provide an area to show the user's score, and a message should appear when the user has matched all 12 images.

Extra Credit:

For additional credit, you can implement your Memory Match game so that each time the page is loaded, the images appear at different locations.  You may also implement a "Wild" image.  If the user clicks on this image and another, the matching image is automatically revealed and all three cards disappear from the screen.

Sample Interaction:

Below are some screen shots of how an interaction with the Memory Match game.