A Python 3 minesweeper generator module
Project description
The minesweeperPy module for Python 3.6
=======================================
#### Made by Steven Shrewsbury Dev. (AKA: stshrewsburyDev)
Screenshots:
------------
![RawTerminalUsage](https://stshrewsburydev.github.io/official_site/API/ProjectScreenshots/minesweeperPy/minesweeperPy0001.png "Raw terminal usage")
Installation:
-------------
###### Install from source:
```
python setup.py install
```
Using in your code:
-------------------
###### Import the module:
```py
import minesweeperPy
```
###### Make a new grid generation setting:
```py
columns = 12 # This will be the amount of columns in the grid (Must be 5+)
rows = 12 # This will be the amount of rows in the grid (Must be 5+)
MyNewGridGeneration = minesweeperPy.MineGen(columns, rows)
```
The number of cells in the grid is calculated by multiplying the column count by the row count:
| Columns | Rows | Cells |
|:-------:|:----:|:-----:|
| 10 | 10 | 100 |
| 25 | 20 | 500 |
| 48 | 50 | 2400 |
###### Generate a new grid:
```py
NumberOfMines = 25 # This will be the number of mines in the grid
#(Must be 1+ and not be more than the maximum space on the Grid generation
# (For example a 10x12 grid would have a maximum of 120 cells))
MyNewMinesweeperGrid = MyNewGridGeneration.GenerateGrid(NumberOfMines)
```
###### Output grid:
```py
>>>print(MyNewMinesweeperGrid)
[["M","1"," "," "," "],
["1","2","1","1"," "],
[" ","1","M","2","1"],
["1","2","3","M","1"],
["1","M","2","1","1"]]
>>>for row in MyNewMinesweeperGrid:
... print(row)
...
["M","1"," "," "," "]
["1","2","1","1"," "]
[" ","1","M","2","1"]
["1","2","3","M","1"]
["1","M","2","1","1"]
>>>
```
###### Links:
* [GitHub repository page](https://github.com/stshrewsburyDev/minesweeperPy)
* [The stshrewsburyDev official site](https://stshrewsburydev.github.io/official_site/)
=======================================
#### Made by Steven Shrewsbury Dev. (AKA: stshrewsburyDev)
Screenshots:
------------
![RawTerminalUsage](https://stshrewsburydev.github.io/official_site/API/ProjectScreenshots/minesweeperPy/minesweeperPy0001.png "Raw terminal usage")
Installation:
-------------
###### Install from source:
```
python setup.py install
```
Using in your code:
-------------------
###### Import the module:
```py
import minesweeperPy
```
###### Make a new grid generation setting:
```py
columns = 12 # This will be the amount of columns in the grid (Must be 5+)
rows = 12 # This will be the amount of rows in the grid (Must be 5+)
MyNewGridGeneration = minesweeperPy.MineGen(columns, rows)
```
The number of cells in the grid is calculated by multiplying the column count by the row count:
| Columns | Rows | Cells |
|:-------:|:----:|:-----:|
| 10 | 10 | 100 |
| 25 | 20 | 500 |
| 48 | 50 | 2400 |
###### Generate a new grid:
```py
NumberOfMines = 25 # This will be the number of mines in the grid
#(Must be 1+ and not be more than the maximum space on the Grid generation
# (For example a 10x12 grid would have a maximum of 120 cells))
MyNewMinesweeperGrid = MyNewGridGeneration.GenerateGrid(NumberOfMines)
```
###### Output grid:
```py
>>>print(MyNewMinesweeperGrid)
[["M","1"," "," "," "],
["1","2","1","1"," "],
[" ","1","M","2","1"],
["1","2","3","M","1"],
["1","M","2","1","1"]]
>>>for row in MyNewMinesweeperGrid:
... print(row)
...
["M","1"," "," "," "]
["1","2","1","1"," "]
[" ","1","M","2","1"]
["1","2","3","M","1"]
["1","M","2","1","1"]
>>>
```
###### Links:
* [GitHub repository page](https://github.com/stshrewsburyDev/minesweeperPy)
* [The stshrewsburyDev official site](https://stshrewsburydev.github.io/official_site/)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
minesweeperPy-1.0.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for minesweeperPy-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706b7dcf52bbfd300e64e5e7db8d216b3a8b8070f19007c49253ecddb436bbc1 |
|
MD5 | ffab16afe120f97cb8aaf03f215c194a |
|
BLAKE2b-256 | d2003ceded1f62f5628673f71f8dc198fe4b982bbbe25bc1a199f6fdbf5fce5e |