nectarboy / minesweeper.js

a Minesweeper port in JavaScript !

Home Page:http://nectarboy.github.io/minesweeper.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minesweeper.js

a Minesweeper port for the browser ! it works on phones too and you can try it here !


introduction

this port tries to be as faithful as possible to the original game, concerning rules, feel, and especially UI :3

some things havent been added, like the score, and some things are a lil different, like the smiley button

all the rules are the same as the original minesweeper :) click the buttons at the top for game customization !

example

importing

minesweeper.js is modular, so be aware of that

<script type='module'>

then you can create minesweeper game instances at will

import MinesweeperInstance from './minesweeper/minesweeper.js';

// create a new instance !
var instance = new MinesweeperInstance(canvas, width, height, mines);
instance.onload = function() {
    this.drawWholeGrid();
    this.mouse.start();
};

nectarboy - 2021

About

a Minesweeper port in JavaScript !

http://nectarboy.github.io/minesweeper.js


Languages

Language:JavaScript 67.7%Language:HTML 22.8%Language:CSS 9.1%Language:Batchfile 0.3%