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-
easyabout 10% of squares will be mines -
normalabout 15% of squares will be mines -
hardabout 20% of squares will be mines
-
-
data-debug: Boolean - Mines will be shown