nayaksofia / memory-game-udacity-sofia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory Game Project

This is a complete browser based card matching game (also known as concentration ).

Memory Game: Click To Play

How the game works?

  • The game board consists of sixteen cards arranged in a grid.
  • The deck is made up of eight different pairs of cards , each with different symbols on one side.
  • The cards are arranged randomly on the grid with the symbol face down.

Game Play Rules:

  • Flip over two hidden cards at a time to locate the ones that match.

Each Turn:

  • The player flips one card over to reveal its underlying symbol.
  • The player then turns over a second card, trying to find the corresponding card with same symbol.
  • If the card match, both cards stay flipped over.
  • If the card do not match, both the cards are flipped face down.
  • The game end once all cards have been correctly matched.

Game Behavior

Memory Game Logic

The game randomly shuffles the cards. A user wins once all cards have successfully been matched.

Congratulations Popup

When a user wins the game, a modal appears to congratulate the player and ask if they want to play again. It should also tell the user how much time it took to win the game, and what the star rating was?

Restart Button

A restart button allows the player to reset the game board, the timer, and the star rating.

Star Rating

The game displays a star rating (from 1 to at least 3) that reflects the player's performance. At the beginning of a game, it should display at least 3 stars (but here i taken 5 stars). After some number of moves, It should change to a lower star rating. After few more moves, it should change to a even lower star rating (down to 1).

The number of moves needed to change the rating is up to you, but itt should happen at some point.

Timer

When the player starts a game, a displayed timer should also start. Once the player wins the game , the timer stops.

Move Counter

Game displays the current number of moves a user has made.

Suggestions to add few more features

  • Add CSS Animation when cards are clicked, unsuccessfully matched and successfully matched.
  • Add unique functionality beyond the minimum requirements(Implement a leaderboard, storegame state using local storage etc.)
  • Implement additional optimization that improve the performance and user experience of the game (keyboard shortcuts for gameplay , etc).

About

License:MIT License


Languages

Language:JavaScript 47.1%Language:HTML 33.6%Language:CSS 19.4%