BDS Software

The Matching Game

This is a one-player game.

You have a board with 100 numbers on it. There are 50 unique numbers - two of each, i.e. two number ones, two number thirty-fours, etc. Every number is hidden (covered by a card).

Your job is to find all the matches.

Enter your nickname for scoring (ten characters max.) and then click the "New Game" button.

Click a card and a red number is uncovered. Click another card and another red number appears.

If the two numbers match, then, after a three second delay, those two numbers change from red to black and 100 points are added to your score.

If the two numbers DO NOT match, then, after a three second delay, those two numbers are covered back up by their cards and 10 points are subtracted from your score.

The game is over when you've found all 50 matched sets. The maximum possible score is 5000.

If you need to stop the game for a short period, just click the "Pause Game" button. It then changes to a "Resume Game" button which you can use to continue the game at a later time.

If you need to stop the game for a longer period, use the "Save Game" button. You will be asked to enter a game name for your game file. Be sure to remember the game name. You'll need it when you return to your game.

Someone else can then play while you're away from the computer.

When you're ready to resume your game, use the "Load Game" button.

Your Current Score:

 High Scores:

Rank Nickname Score



● Your nickname can be a maximum of ten characters and spaces long. If you enter a longer nickname, it will be truncated to the first ten characters and spaces. You cannot use "nobody" as your nickname.

● The maximum possible score is 5000. But, that's an unattainable goal for all practical purposes - it would require that EVERY two card click resulted in a match. If you ever have two non-matched numbers covered back up, you can never reach a score of 5000.

● If you pause a game and somebody comes along and clicks "New Game", your game will be lost. Take appropriate precautions.

● I recommend using short game names when saving a game - they're easier to remember. For example, I use game file names like "p1", "p2", etc. When the file is saved, the Game Name is decorated to minimize the likelihood of game name collisions. For example, if you use "p1" as your Game Name, and your nickname is "Dan-J", then the game will actually be saved as "mdjbdsMatchingGame_Dan-J_p1".

● When you go to load an existing game, make sure your nickname is in the textbox above the "New Game" button. Otherwise, the "Load Game" button won't find the correct game file.

● The saving and loading of games conforms to HTML5's security restrictions against access to anything out of its local domain. For example, if you save a game while playing the Matching Game in a Firefox browser, you won't be able to access that saved game when you're later playing the Matching Game in a Chrome browser. If you go back to the Firefox browser, that saved game will be available.

● The game saving and loading is also local to the computer you're using. If you save the game at home, it won't be available on your neighbor's computer. But, it'll still be there when you come back to your own computer.

● The saving and loading of games and high scores may not be possible on library or other public computers if they have Local Storage disabled. Local Storage should, however, be available on your private home computer, unless you've disabled it yourself. Local Storage is safe - we DO NOT access any personal data on your computer at any time! This game does NOT use cookies. Your game files are entirely private.

● To explore this game's code, just right-click this page and then click on "View Page Source" (in Firefox browsers - other browsers are similar.

● To download this game's image files, just click here.

● To download this game's sound files, just click here.

● The button and canvas (board) click sounds were constructed in Audacity 2.1.0. They work in Edge, Firefox, Chrome, Opera, and Slimjet browsers, but not in Internet Explorer. In order to get these .wav sound files to work in Firefox, I had to make sure they were exported at 48kHz rather than at Audacity's default 44.1kHz.


                                                                                                                                                                M.D.J. 2018/07/21



Atli's response in

Mitchell, Frank. The only way to shuffle an array in JavaScript