GitXplorerGitXplorer
r

minesweeper

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
78997e6443a7021de12244d3f2e4918c714bbbdc

Improve README

rronshapiro committed 7 years ago
Unverified
cc5fe4a3948e23c793d7988bb1ff091425c38dd5

Print full numbers along the sides, and every 10 numbers along the top/bottom

rronshapiro committed 7 years ago
Unverified
6c51792172ca6c8ba12eada3384ee0f437472c5a

whitespace

rronshapiro committed 7 years ago
Unverified
f00ac98db0d13f04a125b38a3e62d735d8d9838e

README.md

rronshapiro committed 12 years ago
Unverified
0b343af6ca27872cba048242fa02a3f7bc5cd714

Validate guess_surrounding()

rronshapiro committed 12 years ago
Unverified
3780d86ab3ed43789da10222871b03f9394d7284

Input validation, ranges and lists, and a couple bug fixes

rronshapiro committed 12 years ago

README

The README file for this repository.

Minesweeper

To run, ./minesweeper. Run ln -s /path/to/minesweeper.py /usr/local/bin/minesweeper to add it to your PATH

Make sure zoom your terminal, it helps with viewing the entire board.

Usually, .2 is a good setting for percent of bombs.

This is pretty raw, so if you find any bugs/have any requests, add the issue to Github. Also, feel free to make a pull request if you make changes that you think would be valuable to the project.

Commands:

  • # #: mark a box that you believe does not have a bomb. E.x. 12 14. You can also prefix this command with 'g' as in 'g 12 14'.
  • f prefix: Mark a box with a flag. E.x. f 12 14
  • u prefix: Unmark a flagged box. E.x. u 12 14
  • s prefix: Shorthand to guess all surrounding boxes to the given box. E.x. s 12 14 would guess 11 13, 11 14, 11 15, 12 13, 12 15, 13 13, 13 14, and 13 15.
    • This command can only be used on boxes that have already been marked as not having bombs. This is a safeguard so that you don't shoot yourself in the foot.

Special Arguments:

  • If instead of a number you pass a list in the following format (#,#,...#), all of those indeces will be used with the indeces of the other axis.
    • E.x. 'f (1,3,5) 2' will call 'f 1 2', 'f 3 2' and 'f 5 2'. Note that if both arguments are lists, then all permutations will be guessed. So 'u (1,3) (2,4)' will call 'u 1 2', 'u 1 4', 'u 3 2' and 'u 3 4'.
  • In any location where you can use a number, you can also pass a range and all of those numbers will be used. E.x. 'f 3-8 2' will mark the entire column from indeces 3-8 inclusive with flags. Note that these may be used in tandem with both arguments to select a box-region. They may also be used in a list: 'f (2,4-8,10) 3' will mark the entire column from 2-10 except for 3 and 9.