Silver Dollar LED Puzzle Game
David Johnson-Davies’ handheld puzzle game simulates silver dollar movement with LEDs.
David Johnson-Davies, as is his tradition this time of year, designed a rather interesting “silver dollar” puzzle game using the ATtiny84A. In this game, 12 LEDs represent the position of five silver dollar coins, lit up in a spaced-out line. Players move each coin to the right by one or more spaces until all of them are stacked up in the rightmost positions, and can thus no longer move. The object is to make movement in a way that the other player – or computer in this case – is stuck in a “no move” scenario.
Each coin is selected using a five-button interface, hitting the button multiple times as needed to indicate the number moves to the right. A little speaker bleeps back if you try to make an illegal move – such as placing one coin on top of another. A "GO" button then lets the computer take its turn. If you win by trapping the computer in a no-move scenario, the speaker plays a tune to congratulate you.
The game setup is manufactured as a small PCB, with space for the LEDs, buttons, a speaker, and even a little curving handle. Power is provided by a pair of AA batteries, which fit nicely on the bottom via a bit of double-sided self-adhesive foam.
The project writeup explains the game's code in some detail, though DJD left out the part about how the program chooses the best move – and how you can always beat it–in order to avoid spoiling the fun. He plans to release this information in a separate post in 2024. On the other hand, the PCB files and code are available there, so you could probably figure it out now if you were so inclined/impatient!