Terminal based Minesweeper using curses. Includes a self playing AI.
Project description
pmine
Example code in Python 2.7+ / Python 3.6+ using only the standard library.
This is a terminal app that is installed as pmine. It requires support for
UTF-8 and curses. Entry point is in minesweeper_cli.py. Use the -h option
to print help.
Usage: pmine [difficulty [width [height]]] [-h] [-d] [-a]
difficulty Integer between 0 and 40 inclusive.
width Integer greater than 1.
height Integer greater than 1.
Options:
-h HelpDisplays this help message.
-d DebugDisplays complete call stacks on errors.
-a AutoEnables AI player to play 20 boards.
In game:
Use the arrow keys or [hjkl] to move.
Press [f] to flag a mine under cursor.
Press [space] to reveal from under the cursor.
Press [q] to quit the game.
There are no commands when AI player is enabled.
Example:
> pmine 3 32 16 -a
This will have the AI player attempt 32x16 boards moderately packed
with mines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmine-1.0.4.tar.gz.
File metadata
- Download URL: pmine-1.0.4.tar.gz
- Upload date:
- Size: 140.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b29aea9df96f81fb12fb1bba70b92c1cf1abd52c588b189e84d44fd8b0af0c4
|
|
| MD5 |
1dfc861a1a859de69615f8fbc199be56
|
|
| BLAKE2b-256 |
b8e18d36a7212a83c27f73c96f65fc458b8e41fe0e9b906e038a9a71867e2e39
|
File details
Details for the file pmine-1.0.4-py3-none-any.whl.
File metadata
- Download URL: pmine-1.0.4-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42c3331d5c0f743c1cd5135017b197f89c18e932d69cbdeab6f6220ce219989e
|
|
| MD5 |
1a9262de5a4fdba798e876f3d82fc89b
|
|
| BLAKE2b-256 |
76cdbf26f95fdb369cae10a3c35cf794bb7d0b1bc1a966a63fe17a7820a64202
|