I bought a new HP Laptop and I'm blabla Windows 10 does no has Minesweeper. That means WRITE MINESWEEPER! YAY!
Kids these days don't know Relentless Logic (a 1960's computer game!), but I grew up with Minesweeper 98 and let me tell you, what you do is, you guess where the bombs are and flag them with the right click; sniff for bombs with the left click, but click a bomb and die.
The graphics are inline base-64 so it's a package portable HTML file (no extra files).
Play in link ^ or in frame v.
There is no fancy algorithm, only a fancy recursive boolean. That's the secret.
Check for bombs ←↙↓↘→↗↑↖ and if no found repeat boolean on those 8 spaces; stop recursion where bombs found; count bordering bombs for logic. For some reason, this creates the famous spread effect and it blew my mind, so simple.
I use a 4-dir && 4-dir re-boolean.
If you get stuck, view my source. The complicated part is only about 40 lines.
That's ^ the tutorial.