Skip to main content
cli-gamesGames

Minesweeper

Open every safe cell without hitting a mine

Mobile betaClassicspuzzleclassic
$ minesweeper

A number shows how many of the eight cells around it hold mines. Open every safe cell to win; hitting a mine ends the game.

The first cell is always safe. Your time is your score, ranked per difficulty.

Open a cell with a tap or r ROW COL; flag it with the Flag toggle or f ROW COL.

Scripts: press Terminal to let your programs play unranked, or type script for Sweep Script.

Sweep Script

Write Bash scripts that open and flag cells with the same commands you type by hand. Sweep Script is a separate unranked scripting challenge.

Durable workspace

~/minesweeper

Read README.txt; start with sweep.sh. Your files remain yours between runs.

Sensors

  • scan [ROW COL]

Actions

  • r ROW COL
  • f ROW COL

Practice evidence

histogram · gif · replay · run receipt · account best

Script runs are unranked practice. Histograms compare submitted results.

Ruleset: minesweeper-sweep-script-v1

Practices: Bash scripts · coordinates · environment variables · state observation

Run $ minesweeper --script

What you will see

A game in progressreplay

Tap or type a cell to open or flag it

How this command behaves

  • Built for a solo session
  • Save and resume your game
  • Track your statistics and high scores
  • Build and keep real Bash files in ~/minesweeper
  • Automation records include histogram and gif and replay and run receipt
  • Runs in the browser; nothing to install
  • Playable entirely from the keyboard

Start it from the prompt

Usage

minesweeper [savename]

Aliases

ms

Opens the terminal in Minesweeper.

Run $ minesweeper