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!
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
Built Distribution
File details
Details for the file pymine-1.0.4.tar.gz
.
File metadata
- Download URL: pymine-1.0.4.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47b39896c4a813ee5cc702e824050c6d0790c42c230e463231ff341aaec756c |
|
MD5 | 3baef7c2cd4ee5dd7b68093c3259b9d8 |
|
BLAKE2b-256 | 821856548b12e0d11c8d19355c7d68992e74828a0264c073e899411d1b0a6943 |
File details
Details for the file pymine-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: pymine-1.0.4-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1f55a59b88860942ec407e403d25b7fc02ecf8094d8bb9964aef00d2d07b0bc |
|
MD5 | 053f195de93d71007d1d144055f0e3b8 |
|
BLAKE2b-256 | 504d24279ee31419d990dd502bc5e3cec811de3daace7964150e2e6a2d0a139a |