installation & usage
Get tmscli running in your terminal in seconds.
Install from PyPI
pip install tmscli
Once installed, the tmscli command becomes available in your terminal.
Command-line flags
| Flag | Short | Default | Description |
|---|---|---|---|
--size |
-s |
9 | Set the board size to x (creates an x × x grid). |
--mine_num |
-m |
5 | Set the number of mines to x. |
--rules |
-r |
off | Show the rules and controls before starting. |
Examples
tmscli
Start with the default 9×9 board and 5 mines.
tmscli -s 16 -m 40
Start with a 16×16 board containing 40 mines.
tmscli --rules
Read the rules first, then start the game.
In-game commands
Once the board is printed, type a command and press enter. Each command takes three parts: an action followed by two coordinates.
| Command | Description |
|---|---|
uc x y |
Uncover the square at (x, y). |
fl x y |
Flag the square at (x, y). |
uf x y |
Unflag the square at (x, y). |
Board symbols
F— flagged(space) — covered / unknown1–8— number of mines in the surrounding 3×3 areaM— a mine (game over)
Coordinates
Coordinates are 1-indexed and must be within the board. The x axis runs down the board, and the y axis runs across:
y------>
x
|
|
|
V
Version note
v0.3.0 added a border to the minesweeper format and minor bug fixes. Update with:
pip install --upgrade tmscli