Simon JS is a version of the Simon memory game written in JavaScript, without a UI framework. The rule is simple: watch a sequence of colours and sounds, then reproduce it in the same order.
A rule that grows with every round
When the player completes the sequence, the game adds another random element. Play continues until a mistake is made.

Separate playback from the response
It helps to distinguish two phases when following the program: the game presents the sequence, then waits for the player’s actions. Checking the response one step at a time lets the game detect a mistake as soon as it happens.
The repository shows the transition between presenting, waiting, and checking. For another experiment, explore the 2D game engine.