Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Minesweeper game implemented in HTML/CSS (cnees.github.io)
11 points by cnees on Oct 15, 2017 | hide | past | favorite | 4 comments


Code: No JavaScript, no CSS3. https://github.com/cnees/minesweeper

Gameplay: Each number tells you how many of the tiles touching it (on sides and corners) are bombs. This board is designed to be solvable without guessing.

Pro Tip: You can undo a move by clicking on the square and typing Shift+Tab.

Discussion: Can you figure out how it works? Can you think of a way to implement flagging, game-over, or other features? Know of any other HTML/CSS hacks?


See also: HTML/CSS Lite-Brite

https://codepen.io/qaz/full/wzams/


Pretty cool. This takes me back.

One thing I noticed is I can see which squares are mines when I zoom out all the way on iOS. Not very noticeable but there’s a thin red line on the bottom of those tiles.


Thanks! That's a nice way to solve it! It looks like when you shrink it, it fits two pixels into the space of one by averaging their colors. I should be able to fix it by putting a margin above the bomb so it's not adjacent to the square you click on.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: