Hacker News new | past | comments | ask | show | jobs | submit login

Right. But that still isn't enough for minesweeper, where a cell can be: covered, marked, uncovered with no mines next to it, uncovered with one mine next to it, uncovered with two mines next to it… etc until uncovered with eight mines next to it.

So except if you limit the game to having no cells with more then one neighbors with a mine, it won't work.




What I'd do:

• All squares start off as unchecked boxes.

• Marked squares are partially-checked boxes.

• Revealed bombs (e.g. player lost, show the board) are fully checked.

• Uncovered squares are deleted, and a number is placed in the space as simple text.

You could absolutely argue the last point is cheating, but, meh, I feel it's within the spirit of the idea.

(Undecided on whether to use disabled checkboxes to mark the perimeter of the playing field; I'd have to try it and see what felt right.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: