Your goals
Implement the engine in Python, press Run code (⌘↵), click cells to play.
- 1Place mines. Set exactly mine_count distinct random cells as mines (_place_mines).
- 2Adjacency counts. Fill in cell.adjacent for every cell (_compute_adjacency).
- 3Reveal. Flood-fill zero cells, lose on a mine, win when every safe cell is open.
If time allows
- +Safe first click. The first reveal is never a mine.