View Full Version : Need script that tells when all matches found in memory game

12-21-2006, 10:54 PM
1) I don't understand how to write the script that tells the game how many pairs where turned over in a memory game. I need it to count the pairs, and when all the pairs are found, then go to #2 below.

2) I want an alert box to tell the player when they have found all the pairs, but not pop up before they have found all the pairs.


Some games have 100 images to find (200 cards total), others have 54 cards.
Thanks in advance! I am just beginning to learn JavaScript and understand it.

A link to the original code I got from vwphillips, if memory serves me correctly:

This script uses only 10 cards, as its a tester script for coding the alert box and counting script.

Many Thanks!:D

12-23-2006, 01:35 AM
vwphillips gave me a link to his latest memory game that I think will solve the problem. It also does more than I asked for, but I think that the fan base will like it much better too! :D