MineSweeper Game In Vanilla JavaScript

themarcba profile image Marc Backes ๐Ÿฅ‘ ใƒป1 min read

I wanted to code a little game and I thought "why not MineSweeper", you remember, the old classic from Windows where as a kid we all didn't know how it worked? Yes, that one!

Here is what it looks like:
Alt Text

You can play the demo here ๐Ÿ‘‰ MineSweeper Game Demo

And if you're interested how I coded this, I uploaded the code to Github.


Editor guide

Oh, thanks for that, man :)

But there is a bug with the menu - when I make game field big (in my case bigger than 15x), the menu goes above viewport and I can't scroll up to use it. Only page reloading helps


Yes, too big field sizes result in graphic bugs such as the one you showed me. Also, it's absolutely not mobile friendly (or even usable)


Hah, that's cool. I did the same thing a while back! codepen.io/ryandunn/pen/XXzbpp

Yours is much nicer though.


I won!

well, it looks like I won. ๐Ÿ˜€๐Ÿ˜€


I forgot I put that in there ๐Ÿ˜…


Really cool stuff! I liked it


Congratulations Marc!

Outcome is sweet and it's really neat that you have developed it agnostically with really few dependencies ๐Ÿ‘


Thank you! I really appreciate your comment


It's fun and well designed. Thanks :)


Thank you so much :)


Lov it, this looks like a really fun side project!


Yes, it was actually really fun.