let's write a Minesweeper game in JavaScript

resulting code: https://gist.github.com/gaearon/bad24360371fcb4fe0bddc6645f6b2c6

this game is likely incomplete and misses some mechanics from the original minesweeper — i’m not an expert 🙂

takehome exercise: add a way to “win” in the game, make the styling match the original one in all states, and make it reveal the wrong flags if you lose.

if you liked this, check out my beautiful dark twisted javascript course: https://justjavascript.com/

By dan

24 thoughts on “let's write a Minesweeper game in JavaScript”
  1. How to go next level so they are the same levels for all players. Still nice for the time used. Perhaps someone can make the mines placed randomly based on user making sound on mic.

  2. Thanks Dan! Its really great to be able to listen to your thought process, while you figure out how to solve a certain task! Excited to see more of these 🙂

  3. Hey Dan, don't know if you did the Advent of Code problems, but if you could try that using JavaScript it would be great. Some problems could also end up with great visualizations if that's something you are interested in.

  4. YouTube is an odd place. One minute I'm watching a Star Wars lore "what if Anakin never joined Palpatine" video, next I'm following one of the creators of Redux.

    Jokes aside, thanks Dan for taking time to create a channel and post content. Also your struggle to "find that damn rabbit" gives us normal people hope!

  5. I really appreciate these videos. The interviews you did are really good as well. I am definitely on the watch any content from you wagon at the moment. I really appreciate hearing how you think through problems and your thoughts.

Leave a Reply

Your email address will not be published.