minesweeper game logic from http://minesweeper.mineblown.com


Keywords
minesweeper, mineblown
License
MIT
Install
npm install mineblown-logic@1.0.8

Documentation

MineBlown-Logic

Minesweeper game logic implementation easy for use. Created as part of MineBlown project (http://minesweeper.mineblown.com)

About MineBlown Project

MineBlown is a free to play retro looking cutting edge minesweeper online game. The project started in order to fix the current abusive attitude toward minesweeper as an old irrelevant game, by providing twists in a way that reaches its full potential.

Features

  • Custom game board.
  • Stopwatch.
  • Mines left.
  • Set flags.

Install

npm install mineblown-logic --save

Require

var mineblown = require("mineblown-logic");

Usage

Board Game Initialization

var { Board, Game, RandomBoardLocationsProvider } = require("mineblown-logic");

var minesIndices = RandomBoardLocationsProvider.getRandomIndexesByBoardSize(10, 10, 10); var board = new Board(10, 10, minesIndices);

var g = new Game(board);

Contribution

Issue, idea, PR are welcomed.

License

MIT