This contains a little minesweeper written in nodejs, playable on your local machine's command line, with nodejs installed.
Source code under src is written in ES6. Whereas those under lib is transpiled to ES5 using Babel.
The Board and Game classes are stored in their js files respectively.
To play Minesweeper, we will create instances of MineSweeperGame in command line.
For example:
- In the command line, navigate to the lib directory and run
node
- Run
.load game.js
to load the contents of this file. - Then create a Game instance and run commands like so:
let game = new Game(3, 3, 2);
game.playMove(0, 0);
game.playMove(2, 1);
- When done run
.exit
- Custome board size and number of bombs.
More features to be added soon...!