1.0.2 • Published 5 years ago

react-minesweeper v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

react-minesweeper

react-minesweeper is a classic minesweeper game written as a React component. You can set the amount of fields and a bomb chance. Styles are only applied by CSS classes so it's easy to customize.

Link to the demo


Installation:

npm install --save react-minesweeper

Usage:

Import the default styling as shown in the demo page or create your own styles

import "react-minesweeper/lib/minesweeper.css";

Render the component

 <Minesweeper
    onWin={() => console.log("GAME WON")}
    onLose={() => console.log("GAME LOST")}
    bombChance={0.15} // 15% chance that a field will contain a bomb
    width={10} // amount of fields horizontally
    height={10} // amount of fields vertically
/>

Is there something wrong?

Please tell me!

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago