Click on a tile to: If you are in Flag Mode (PRESS SPACE to toggle), set (or remove) a flag. If you are not in Flag Mode, it reveals the space you clicked. If you think you flagged all the mines (and ONLY the mines) press E to reveal if you actually did.
The grid size can't be bigger than 11. This was really fun to make. =D