It currently renders game board as a table of set size: 20x18, with 50 mines.
I don't consider this done, I certainly need to re-factor a fair bit of the code to make it more maintainable. Not to mention also easier to use. I'd also like to add a way to let the player choose his or her own play size and number of mines. Maybe even add a timer, and a way to submit scores to a central server whether that's mine or someone else's.
This is playable though. Most of what I consider to be the basics of the game is here. It will randomly generate a field of mines, put the numbers down over the whole board where they are suppose to be, if you click on a blank space then it will expand until it hits a non-zero number, I've even added the flags. If you right click on an unexplored space then it will turn yellow to flag that space as having a mine. Once you've exposed all of the spaces without mines, it will end the game and all of the mine spaces will turn green to show they are cleared. Refresh the page to start a new game.
Like I said, features that I want to add include:
- GUI for player to choose their own options.
- Timer to show how long the game has been going, starting from the first move.
- Ability to right-click on a number and, if you have the right number of adjacent spaces flagged, have it expose the remaining spaces.
- Possibly a way to submit high-scores to a website. Might not do this though, due to people who would cheat it.
- Modify the code so when you click on a mine, it will stop you from making additional moves and turn all of the mine spaces red.
- Make it impossible to click on a mine as the first round of the game. I think other variants regenerate the board before revealing that space.