Skip to main content

A Python implementation of the classic Minesweeper game

Project description

PYTHONSWEEPER

Pysweeper is a Python implementation of the classic Minesweeper game. It is a simple game where the player has to find all the mines in a grid without detonating any of them. The player can mark a cell as a mine by right-clicking on it. The game ends when the player detonates a mine or when all the cells that are not mines are revealed. The libraty focuses on the game logic and does not provide any graphical interface. The game can be played in the terminal or in a graphical interface using the Pygame library.

Installation

The library can be installed using pip:

pip install pythonsweeper

Usage

import pythonsweeper as ms

# Create a game with 10 rows, 10 columns and 10 mines

game = ms.Game(10, 10, 10)

# Reveal a cell

game.reveal(0, 0)

# Mark a cell as a mine

game.mark(0, 0)

# Get the player's board

game.get_player_board()

# Get the game's board

game.get_board()

#etc.

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Authors and acknowledgment

The library was created by Boris Khesin (aka Shagulka) and is maintained by him.

Project status

The library is still in development and is not yet ready for production use.

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

pythonsweeper-0.1.3.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file pythonsweeper-0.1.3.tar.gz.

File metadata

  • Download URL: pythonsweeper-0.1.3.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for pythonsweeper-0.1.3.tar.gz
Algorithm Hash digest
SHA256 835cb17e72b4288f831c613e235a1f538ab8f2fb46acba70ff7451c8e64b2ca6
MD5 d48c1b7d38f7381fd36dd6b8f43658dc
BLAKE2b-256 7dbcc71fbc60dbf51c76cfed157c64a654788ed3bbf10dbde1aee61f513033cf

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