Minesweeper, with no loop over cells.
The game you already know how to play. What is worth a look is underneath: the whole board's adjacent-mine count is one indexed sum, and opening an empty region is a converge: keep adding the neighbours of revealed empty cells until the set stops growing. No recursion, no queue, no loop over cells anywhere. The entire game is at the bottom of this page.
seed
Left click opens a cell · right click plants a flag · clicking a number that already has enough flags around it opens the rest. The first click is always safe, and always lands in open space.
The whole game: assets/sweep/sweep.k
loading…