Skip to main content

An interactive minesweeper game for your terminal.

Project description

ASCII Minesweeper

Gitpod ready PyPI version shields.io PyPI license

Inspired by a minesweeper game on my graphing calculator, I decided to create this version that you can play directly in your terminal. I originally started this project as an Easter egg project to embed into another Python script. This implementation is written in Python and uses numpy under the hood. While it is called ascii-minesweeper, it actually does use a few characters not in the ASCII character set. Hope you enjoy playing!

Gameplay

ascii minesweeper screenshot

Install

pip install ascii-minesweeper

Run

In order to run the program from the terminal, you can type:

minesweeper

Otherwise, you can also launch the program from another Python script as an Easter egg like this:

from minesweeper import PlayMinesweeper
play = PlayMinesweeper()
play.launch_game()

Controls

  • Arrow keys or WASD - Moves the cursor
  • Space - Mark a square as a flag, question mark, or back to hidden
  • Enter - Select a square to uncover
  • Backspace or CTRL-C - Returns to main menu

Play in your web browser

Click this link below to open the code in Gitpod and sign in with your GitHub account.

Open in Gitpod

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ascii-minesweeper-1.0.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

ascii_minesweeper-1.0.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file ascii-minesweeper-1.0.1.tar.gz.

File metadata

  • Download URL: ascii-minesweeper-1.0.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for ascii-minesweeper-1.0.1.tar.gz
Algorithm Hash digest
SHA256 04bac1aade150114e22e8ea1780dc5bfd2e6832e909b4e73b4eb307e1307c905
MD5 5c8eafcad137d8f270de40057851eb57
BLAKE2b-256 3782f3bcad333af736f5980590a9a34ea716f5ed731d9016d46fe3f35293f22c

See more details on using hashes here.

File details

Details for the file ascii_minesweeper-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ascii_minesweeper-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf213bc0db59ebda662659f875c95d20880abc0a1d4281310a7b679538c0a37e
MD5 6aea0e5d9186b782e7462013f59a7f7b
BLAKE2b-256 f4bae0976096a680fba9f77719bee50dc0e89137d5538dc3db1aef064d0dca36

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page