Hacker News new | ask | show | jobs
by mikehodgson 2525 days ago
I'm sure there's only a few ways to do it, but this code is really similar to the one I wrote back in December: https://github.com/mikehodgson/minesweeper

It is playable here: https://sweeper.games

No jQuery, just straight CSS/HTML/ES6

2 comments

This playable version seems to be missing the feature of auto-revealing the squares, usually a ctrl-click on a square to compare against placed flags. It's actually rule 5 from the linked page
That feature is implementation specific, not a rule of the game. I've never used it, so I didn't bother implementing it.
I just tried playing! You have a bug, there is no way to unmark a cell, so, when I did one incorrectly, I couldn't click on it :(
Thanks for the feedback, just pushed a fix for it! :)