Skip to content

Latest commit

 

History

History
35 lines (17 loc) · 1.32 KB

README.md

File metadata and controls

35 lines (17 loc) · 1.32 KB

MEMORY

MEMORY is a fun card game which does not require a lot of code. This is an implementation of the game.

Rules of the game

1 - The player chooses the difficulty level: 1, 2, 3 or 4. These levels require the player to solve a game with a deck of respectively 16, 32, 48 and 64 cards.

2 - A deck of cards is composed of pairs of cards with the same rank. Ranks are defined randomly by the program with values between 10 and 99, included.

3 - The cards are shuffled and laid face-down.

4 - The player starts by picking up two cards. If the cards are of the same rank, they are removed from the game; otherwise, they are laid back on the board face-down.

5 - The player continues to pick two cards, as described at rule 4, until all cards are removed, thus ending the game.

6 - At the end of the games, the player may take notice of how many attempts he has made in total, and the time, in seconds, elapsed since he has picked the first card.

Usage

Download the repository and open index.html.

Note that this game uses sounds: you can disable sounds after opening index.html.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU