Updated on Jun 3rd, 20211 min readd3graphicsgameswindows

D3 Visualization | Minesweeper

How To Play

  1. 1Set a difficulty level to Beginner, Intermediate or Expert
  2. 2Click any cell on to start
  3. 3Numbers represent the quantity of bombs in the 8 surrounding cells
  4. 4Right Click any cell to plant a flag designating the cell as a bomb
  5. 5Clear all cells without exploding


LevelBombsGrid Size
Beginner109 x 9
Intermediate4016 x 16
Expert9916 x 30


As part of a recent interview process I was sent a package of materials to study in advance. One of the suggested assignments was to create a command line version of Minesweeper. Minesweeper is a classic game that first appeared on Windows 3.1 in 1992.

I decided building a version with a graphic interface would be more interesting. I used D3 and created all the graphical components with Boxy Svg. Figuring out the business logic was more challenging than I had anticipated which made this a really rewarding project to complete.

Check out the source code on Observable

Benjamin Brooke Avatar
Benjamin Brooke

Hi, I'm Ben. I work as a full stack developer for an eCommerce company. My goal is to share knowledge through my blog and courses. In my free time I enjoy cycling and rock climbing.