Skip to main content

pyMine is open-source module for Python, helps you to create or play old classic Windows Mine game in Python Terminal enviorment.

Project description

Welcome to pyMine!

Classis Mine game in python!

screen-shot pyMine is an open-source module for Python, helps you to create or play old classic Windows Mine game in Python Terminal enviorment.

How to install?

pip

pip install pymine

How to play?

After installing module, you need to import it.

import pymine

pyMine module includes mine_engine class, clear_terminal function and COLOR class. create a mine_engine object.

game = mine_engine(row=10,col=10,mines_count=20)

if you wish to define row,col and number of mines later, feel free to leave inputs empty, lator you can set or edit values by:

  • num_mines -> int
  • map_size(row,col) -> function

After defining mine attributes, first we need to create game board and build cells, then we have to generate mines into board cell.

game.create_map() #this will build up game map.
game.generate_mines() #this will generate mines and put them into game board.

It's better not to change any of the attributes while playing to prevent any errors.

After all these, you can now print out the game board.

game.print_map()

so now you can start playing, use flag(row,col) to flag a cell, use click(row,col) to choose and click on a cell, it will reveale number of mines around or it will explode!

Have fun! contact me if you needed help or anything else: soroushmpour@gmail.com © @soroushamdg made it.

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

pymine-1.0.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

pymine-1.0.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file pymine-1.0.3.tar.gz.

File metadata

  • Download URL: pymine-1.0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for pymine-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4233600a47d5fd46885c18142255b476d4694785abca4bdb9ff5420e2f4088d1
MD5 2342f4ebe77f07c11c288a05c4bbb903
BLAKE2b-256 d2ec5b33475c0b1a27a307662cde6c40c294298137e4c721ea04d7f78304512c

See more details on using hashes here.

File details

Details for the file pymine-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pymine-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for pymine-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e6aede019a750c883fc60bc240d2593af3dbc6dc0f8d81a417b35f2bbc9ca0da
MD5 681e856de2f0841800b5763ec3edf75e
BLAKE2b-256 c08ad2754db3a2cf4f0b38f71828d4d6daae996fba1da2ef2bd1ea90b8bad0e2

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