
I am the controller for the mine sweeper game.įunction MineSweeper( selector, columnCount, rowCount, bombCount ) else if (!( ".active" ). Mine Sweeper Game Clone with Vanilla Javascript. The process is pretty simple - we need to create a two-dimensional array containing instances. The game controller itself is wrapped up in this Javascript class: 0:40 - initialize the game field and store it in field variable. I am posting 3 files: index.html minesweeper.js minesweeper.css Also: It does not have 2 major features - timer and flagging.

I have tried to use the oops while doing this. The game has to be played in a TABLE node because the game logic requires the structured relationship between table cells. I created a simple minesweeper game as I am trying to get my hands dirty in JavaScript.

Others are not essentialthey are used for analytics and allow us to learn more about our community. When the DOM is ready, build the mine sweeper game. Some are essential to the website functionality and allow you to manage an account and preferences.
