It may take some second to load all the pictures if you d not have a fast internet connection. If all pictures are loaded you can press new game to start.
Game rules
At the very beginning of the game 72 cards lay face-down on the table. The current player opens a first card, and then a second card. If they show the same picture, the player may remove them from the table, he recieves a point, and this very same player can open two cards again. If he has opened two different cards, he must close them, and the next player can play. The game is finished if all cards are gone. The player with the most points (= the most cards) has won.
How to play
-
Click a card to open it.
-
If you know the card with the same picture, open that card. Otherwise, click any card to open it.
-
Click again to take away the cards (if they are the same), or to close them.
-
If the cards were the same, go to step 1. Otherwise click anywhere and the computer opens a card.
-
Click anywhere again and the computer opens another card.
-
Click again to take away the cards (if they are the same), or to close them.
-
If you want to start a new game, press the button "New game". If you want to end the game, press show them all, and you can see the cards you were desperately seeking.
Sourcecode
-
memory.java
Just the java sourcecode. You can read it
to see how the game works.
-
memory.zip
(39 kb). All files: images, sourcecode and
html-file. Extract it into a new directory and you can play the game on your own
computer.
It is possible to play the game with your own pictures. Download the zipfile, unpack,
and replace the pictures with your own pictures of the same size and the names
0.gif, 1.gif, ..., 36.gif
. If your pictures have different size, you must modify
the program accordingly. Here are some hints.
-
Somewhere in the listing is the line:
final static int SIZE=52;
//cardsize (in pixels)
SIZE should be 2+[size of picture]. For example: with 40 by 40 pixels, it should be 42.
-
Pictures must be square.
-
If you want to have the pictures with more room inbetween, try to raise PICOFFSET and
SIZE together.
-
If you want to use JPEG-files, search the string
+".gif"
and make it
+".jpg"
.
-
You can make the program play better by raising
PCMEMSIZE
.
-
After trying very hard :-) you may mail me and maybe I can solve your problem.
[click here if you see no menu]