Here you can find the online demo of the game.
Link script.bundle.js
to your HTML file.
<script src="src/js/script.bundle.js"></script>
Then later:
<div
class="minesweeper"
data-width="10"
data-height="10"
data-difficulty="normal"
data-debug="false"
></div>
Attributes:
-
class
: must include minesweeper -
data-width
: int - Number of rows -
data-height
: int - Number of columns -
data-difficulty
: String - Affects the number of mines distributed on the map-
easy
about 10% of squares will be mines -
normal
about 15% of squares will be mines -
hard
about 20% of squares will be mines
-
-
data-debug
: Boolean - Mines will be shown