README (3040B)
1 A minesweeper solver and game. 2 3 Download binaries at http://danamlund.dk/minesweeper_solver 4 5 I have successfully compiled this using Ubuntu 11.04 (with ncurses) 6 and using MinGW (with pdcurses). The Makefile and source checks and 7 adjusts itself depending on which system you use. 8 9 Below is the "--help" output from the programs in this repository: 10 11 Usage: minesweeper [OPTION]... [FILE] 12 Start a new minesweeper game to FILE or standard output 13 (see -n), or process a turn in an existing minesweeper 14 game from FILE or standard input. 15 16 -n Start a new game. 17 -f Start the new game fairly (reveal a hole) 18 -b INT Start the new game using a predefined board: 19 0: 8x8 grid with 10 mines 20 1: 16x16 grid with 40 mines 21 2: 30x16 grid with 99 mines 22 3: 78x21 grid with 450 mines 23 -x INT Set the width of the grid. 24 -y INT Set the height of the grid. 25 -m INT Set the number of mines. 26 -h, --help Show this help menu. 27 -v Verbose output (to stderr). 28 29 The FILE contains information about the game and provide an 30 interface to the game. Only modify the file by overwriting 31 characters in the first grid, the reader is sensitive(bad). 32 33 Legend of the symbols in the grid: 34 . A unknown tile 35 space A tile with no bombs surrounding it 36 1-8 A tile surrounded by 1-8 mines 37 ! A tile designated by the user as a mine 38 ? A tile designated by the user as not a mine, 39 running minesweeper processed these 40 * A exploded mine. If you see any of these you 41 have lost 42 43 Example: Playing a game of minesweeper 44 Start a new game called using file 'foo': 45 run 'minesweeper -n -b 1 foo.txt' 46 Play minesweeper: 47 1) Edit file foo.txt 48 2) Replace .'s with ?'s or !'s to mark tiles that are 49 not mines and mines, respectively 50 3) Process your input by running 'minesweeper foo.txt' 51 4) Go to step 1) 52 53 54 Usage: minesweeper_solver [FILE] 55 Solve as much as possible of a minesweeper game 56 from FILE or standard input. It solves it by 57 replacing unknown tiles (.) with either mines (!) 58 or not-mines (?). 59 60 -h, --help Show this help menu 61 -v Verbose output (to stderr) 62 -m Replace explosions (*) with mines (!) 63 -c INT Set new cluster size limit (default is 15) 64 65 The game modifies a interface file generated by 66 'minesweeper'. 67 68 Example: Solve a game of minesweeper 69 Start a new game called foo using the 'minesweeper' 70 program. 71 Solve minesweeper: 72 1) run 'minesweeper_solver foo' 73 2) Process a turn by running 'minesweeper foo' 74 3) Go to step 1) 75 76 77 Usage: minesweeper_curses [FILE] 78 Start a curses user interface using the minesweeper 79 game from FILE or game.txt by default. 80 81 -h, --help Show this help menu. 82 -w WINDOW-ID Set up recording using Imagemagick 83 -m 'CMD' Use CMD instead of './minesweeper' 84 -s 'CMD' Use CMD instead of './minesweeper_solver -m' 85 -a 'ARGS' Append ARGS when running './minesweeper' 86 and './minesweeper_solver'