Here's the code for the Simple Simon game. Download the zip file, extract it, and load the sketch to your Circuit Playground using the Arduino IDE.
You can press the RESET button at anytime to start a new game. When the game starts, you must first select a game difficulty level using the SKILL LEVEL button. Then press the GAME START button to start playing.
The SKILL LEVEL sets the total length (N) of the game sequence.
The game is played by repeating the sequence of lights shown using the associated touch pads. There are four different sections of lights, each with its own color and tone.
Use the touch pads shown for each color. You can press one or both, it doesn't matter.
The sequence starts with only one light. It then grows by one light each time you successfully complete the sequence. Thus the game starts easy, and gets more difficult as it progresses. To make it even more difficult, the sequence playback speeds up when the sequence becomes longer.
To game is won by completing the entire sequence for the chosen skill level without making any mistakes. A super special sound and light show called a 'razz' is displayed for the victor.
There are two was to lose the game:
- Pick an incorrect light in the sequence.
- Take too long (>3 secs) to pick the next light.
If either of the above happens, the game ends. The light that was suppose to be next is shown.
Simply press RESET to start a new game.