https://github.com/igor47/sweeper
ncurses minesweer using python3 + curtsies
https://github.com/igor47/sweeper
Last synced: about 1 year ago
JSON representation
ncurses minesweer using python3 + curtsies
- Host: GitHub
- URL: https://github.com/igor47/sweeper
- Owner: igor47
- Created: 2021-01-03T05:27:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T17:51:33.000Z (about 4 years ago)
- Last Synced: 2025-03-14T18:54:28.401Z (about 1 year ago)
- Language: Python
- Size: 43 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-tuis - sweeper
- awesome-cli-apps-in-a-csv - Sweeper - Basic ncurses Minesweeper game, wirtten in python, using curtsies library. (<a name="games"></a>Games)
- awesome-cli-apps - Sweeper - Basic ncurses Minesweeper game, wirtten in python, using curtsies library. (<a name="games"></a>Games)
README
# Sweeper
This is a basic ncurses minesweeper game.
It is written in Python, using the awesome [curtsies](https://github.com/bpython/curtsies) library for interacting with the terminal.
## Installation
This requires [poetry](https://python-poetry.org/) to install.
If you don't have `poetry`:
```bash
$ pip install poetry
```
To install the game:
```bash
$ poetry install
```
## Running
Run with `poetry` like so:
```bash
$ poetry run ./sweeper.py
```
## Interface
The following commands are supported:
------------------------------------
| Key | Action |
| :-: | :-- |
| h | Display in-game help menu |
| c | Close any open in-game menu |
| l | Pick difficulty level |
| n | Start a new game |
------------------------------------
While a game is in-progress, use the arrow keys (←,↑,→,↓) to move the cursor around the mine field.
Hit `` to open the cell under the cursor.
Hit `f` to flag a cell as a mine.
Hitting `` on an already-opened clue cell will highlight adjacent cells.
If the number of neighboring cells that are flagged equals the value of the clue, then all remaining unflagged cells will be opened.
## Screenshot

## TODO
I wanted to implement a version of sweeper where you don't have to guess, but this turned out to be more complicated than I thought.