The objective of the game is to clear a rectangular board containing hidden "mines" or bombs without detonating any of them, with help from clues about the number of neighboring mines in each field. "LeftClick" is used to reveal a square, Press "Shift"+"LeftClick" to put a flag on a square that you think there is a mine hiding beneath it. The game is won after all the mines are marked with a flag.
dont worry. all the high scores will be saved for the next time you want to blow some bombs.
You can access the game here.
You dont trust github-pages and want to host the app yourself? no problem. all you need to do is to copy this next lines:
git clone https://github.com/mmm1513/mines.git
cd mines
yarn start
git clone https://github.com/mmm1513/mines.git
cd mines
yarn test --watchAll
These tests checks all the board logics.
Output example:
✓ should reveal the right cells on reveal action on empty space (32 ms)
✓ should display all empty cells and not the flag cell contained in that area (12 ms)
✓ should enter to flag mode on spesified key (shift) pressed (5 ms)
✓ should add a flag to selected cell (4 ms)
✓ should remove a flag to selected cell (5 ms)
✓ should disable any extra flags to be sdded after reaching the limit (4 ms)
✓ should not reveal flag when clicked on (3 ms)
✓ should create a board with same amount of bombs and flags, and also numbers with close bombs (7 ms)
✓ should end the game and win when the last bomb was flagged (6 ms)
✓ should stop the game when bomb was clicked (3 ms)
✓ should show only the number after clicked on a number cell (4 ms)
To publish the app copy this next lines:
yarn predeploy # building the app
yarn deploy # publish to github-pages