1 min read

Simon Game

This is a project I’ve done while doing the freeCodeCamp to get my FCC Front End Certificate.

See the complete challenge specifics at FCC Simon Game.

Objective

Build a CodePen.io app that is functionally similar to this demo.

Fulfill the user stories. Use whichever libraries or APIs you need. Give it your own personal style.

User Stories

  1. I am presented with a random series of button presses.
  2. Each time I input a series of button presses correctly, I see the same series of button presses but with an additional step.
  3. I hear a sound that corresponds to each button both when the series of button presses plays, and when I personally press a button.
  4. If I press the wrong button, I am notified that I have done so, and that series of button presses starts again to remind me of the pattern so I can try again.
  5. I can see how many steps are in the current series of button presses.
  6. If I want to restart, I can hit a button to do so, and the game will return to a single step.
  7. I can play in strict mode where if I get a button press wrong, it notifies me that I have done so, and the game restarts at a new random series of button presses.
  8. I can win the game by getting a series of 20 steps correct. I am notified of my victory, then the game starts over.

CodePen

This is the solution I’ve submitted using React on CodePen.

See the Pen React Simon's Game by Lorenzo (@lorepirri) on CodePen.



If this article was useful to you, please share it using your favorite way for doing it! If you have suggestions of improvement or you’ve found something wrong, please let me know!


You are not being tracked on this website, no analytics, no cookies taken. I am still looking for a good plugin for comments which respects people's privacy. This website is hosted by Gitlab Pages which as far as stated by their general GitLab's privacy policy terms they collects potentially personally-identifying information like Internet Protocol (IP) addresses as mentioned in this thread.