Skip to main content

PYSWEEPER

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 pysweeper

Usage

import pysweeper as ms

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

game = ms.Board(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_board()

# Get the board with the mines

game.get_full_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.

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.1.tar.gz (2.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pythonsweeper-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 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.1.tar.gz
Algorithm Hash digest
SHA256 a0e81cf944edf5a5c3f73ee6608e5cd174560e2c5dc38d17a8cc299c8a12f40c
MD5 def0f30d59b7aa2a6e06ce87cd909c7b
BLAKE2b-256 97acf6122dc413aae74287cab14fa5d425f0e2a2b03d2987dee40f4b2fb2a4ad

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

1 file

0.2.10

1 file

0.2.9

1 file

0.2.8

1 file

0.2.7

1 file

0.2.6

1 file

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

This release

0.1.1 This release

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page