THE MEMORY GAME

 


The memory game is played by matching two cards together, any two cards matched correctly give the player one point.

It is a basic mobile game designed with HTML, CSS and Javascript only. 

When two cards are chosen correctly, the data-id of the cards are stored in an array using the PUSH method. While the Math.random is to shuffle the game when the game restarts or the browser refreshes.

The game cards cannot be viewed or inspected using the browser developer/inspect element tool. Every card was added to the game board using the javascript APPEND method to avoid cheating.

Some other methods used in developing this game include:

  • Array [];
  • Sort();
  • Append();
  • Math.random();
  • Push();
  • if... else ....



Play game HERE


Comments

Popular posts from this blog

ROCK-PAPER-SCISSORS GAME