Click closed tiles to open them. The number on the tile represents how many mines are around it (Including Diagonals). Your goal is to not click the mines. There are 30 mines. Press space to toggle between flagging and opening. The button in the top right shows what mode you are in. Press solve to open all of the tiles and flag all of the mines. Click new game to make a new game, and restart to restart the game with only the first 0 tile you clicked being open. When you think you are done, click check. If you solved it correctly, it will bring up the endgame screen. The top counter shows how many mines you have flagged or opened. The next counter shows how many squares that aren't mines that you haven't yet opened.
All of the code for this is mine. I can't avoid loading times because of how I coded it.