As a side note, if you enjoy playing Minesweeper but don't like losing to a bad guess, you might want to try the implementation in Simon Tatham's puzzle collection:
Unlike most other implementations, it only generates boards that can be solved by logic, so you never need to guess; your first square is guaranteed to be safe and to reveal enough information to progress.
(IIRC, the algorithm used to pre-solve each generated level bottoms out in an exhaustive search, so I guess this game variant is still in NP.)
http://www.chiark.greenend.org.uk/~sgtatham/puzzles/
Unlike most other implementations, it only generates boards that can be solved by logic, so you never need to guess; your first square is guaranteed to be safe and to reveal enough information to progress.
(IIRC, the algorithm used to pre-solve each generated level bottoms out in an exhaustive search, so I guess this game variant is still in NP.)