I made a very simple 1D pong game, much like other people in the past. I made it on a delay so that it would slowly speed up over the course of a game, starting at 500ms to get across the row and dropping 25ms every time until the game was done. When the game finishes and a player wins, all of the LEDs turn on and whoever’s side that it goes over is the loser.
Currently there is no way to get out of the “winner” screen without resetting the arduino, as well as the game starts automatically, so I would definitely change that if I had more time and reason to develop it longer.
it uses 1 state machine and 3 states in total, one for going left, going right and “winner.” Each state is only able to be changed when the on LED is the last one in the row. If the state goes over the timer that determines how long the lights blink then it automatically goes to the “winner” so you really just have to tell whose side the light went over.