Skip to content

mtbanh/Clicky-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The Simpsons Clicky Game

About

This game was created using react and it is a memory game. The objective is to remember all the characters that have already been clicked, and not clicking the same character twice.


gif demo


Getting Started

  • Begin installing Create React App globally by running the following command in your terminal: npx create-react-app <appname> where <appname> is what you want to name your app. Example: npx create-react-app practiceapp.

Code Highlight

The code snippet belows demonstrate how the pictures are shuffled after every click.

  shuffled = newClicked =>{
    for (var i=newClicked.length -1; i>0; i--){
      const j = Math.floor(Math.random() * (i+1))
      const temporary = newClicked[i];
      newClicked[i]= newClicked[j];
      newClicked[j] = temporary
    }
  };

Deploy Link

Live site


Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors