We can now read switches and drive the LED outputs. Next we are going to create a pattern matching game where the player has to repeat a sequence which gets progressively longer.

The sequence will be displayed on a row of LEDs. A player must then repeate the sequence by pressing on switches in the right order. The player loses if they either fail to press the correct switch, or they fail to press any switch within a time limit. If a player successfully repeats the sequence another step is added, and the game repeats. The game program must keep track of the length of the sequence being played; this serves as the player's score when they finally fail.

There are numerous variants of this game, which has been produced on a wide range of hardware platforms.