cmine

Minesweeper for curses.

cmine.tar.gz 11 May 2004 8.0k
cmine-1.4.tar.gz 11 May 2004 8.4k

Description

This is another implementation of minesweeper, but using curses. Boasts mouse support, colour, and a 'solver/hint' algorithm.

See also:

About the solver: Not all games are solvable, but here is a description of the algorithm I used. Scan the grid, from the top left, looking for an exposed cell with number n. Count the number of covered cells still surrounding it, c, and of those cells cound the number that are flagged, f. If f>n there is a problem (too many flags). But, if f=n then we have flagged all the bombs around that cell, so you can immediately expose the remaining c-f adjacent cells. Repeat this, starting at the top left cell again. If you exhaust all cells without exposing anything, then the game is either solved, or unsolvable (without guessing).

Source repository

The subversion repository for this software can be accessed through http://svn.adaptive-enterprises.com/misc/cmine or browsed with ViewVC.

Licence

This software has been placed in the public domain.