DEV Community

Marc Backes
Marc Backes

Posted on

MineSweeper Game In Vanilla JavaScript

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.

Top comments (13)

Collapse
 
yevgalis profile image
yevgalis • Edited

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

Collapse
 
themarcba profile image
Marc Backes

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)

Collapse
 
ryandunn profile image
Ryan Dunn

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

Yours is much nicer though.

Collapse
 
raddevus profile image
raddevus

I won!
winner

well, it looks like I won. 😀😀

Collapse
 
ryandunn profile image
Ryan Dunn

I forgot I put that in there 😅

Collapse
 
themarcba profile image
Marc Backes

Really cool stuff! I liked it

Collapse
 
daviddalbusco profile image
David Dal Busco

Congratulations Marc!

Outcome is sweet and it's really neat that you have developed it agnostically with really few dependencies 👍

Collapse
 
themarcba profile image
Marc Backes

Thank you! I really appreciate your comment

Collapse
 
waylonwalker profile image
Waylon Walker

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

Collapse
 
themarcba profile image
Marc Backes

Yes, it was actually really fun.

Collapse
 
jannikwempe profile image
Jannik Wempe

It's fun and well designed. Thanks :)

Collapse
 
themarcba profile image
Marc Backes

Thanks :)

Collapse
 
themarcba profile image
Marc Backes

Thank you so much :)