This Memory Game is a project made in pure javascript, html and css.It is a Project for practice web front-end skills in the Udacity Front-End Nanodegree. You can test and exercise your memory capacity.
This game consist in pairing two cards. It show:
- 8 pair of cards.
- one scoreboard to show time, moves and score. The game is score with stars:
- Complete the game with 1-4 errors (3 stars).
- Complete the game with 5-8 errors (2 stars).
- Complete the game with +8 errors (1 star). The game finish when all your card are pair.
This game you can play online: https://djackcu.github.io/Memory_Game/ or can play in your computer:
$ git clone https://github.com/djackcu/Memory_Game.git
$ cd Memory_Game
and open the file index.html
memoryGame is a object that contain array of cards moves and stars, and methods to initialize and shuffle cards, logic to play cards and track the score memoryGame.clickOnCard is an event listener to show and activate cards, match cards (calling matchedCard()),deactivate cards (calling deactivatedCard()), update the score(calling updateScore()) and end game(calling endGame).
calculateTime() and updateTime() are executed every second to show the time.
createDeck() create the stock of card.
restartGame() and backToGame() restart the game.
createGame() and endGame() initialize and end the game.
This repository is one of the project of Udacity's Nanodegree. Therefore, we most likely will not accept pull requests.
Dieter Jackson