A terminal-based code-breaking game Mastermind
Project description
open-mastermind
Terminal-based python of classic board game Mastermind®
to get the game
Install with pip
from the command line:
pip install open-mastermind
And run with this command:
mastermind
Although written in Python3.7, it's compatible back to Python2.7.
to get the code
Clone the repository, then install the requirements (currently only the non-standard python library colorama
, which prints a colorful terminal.)
git clone https://github.com/philshem/open-mastermind.git
cd open-mastermind
pip install -r requirements.txt
And to play from your downloaded code:
python mastermind.py
example game play
Each puzzle contains 4 boxes. Each turn you choose from 6 colors.
Can you guess the puzzle before your turns run out?
Color choices: r g y b m w
Example turn: rybg
Response:
◍ : correct color in correct position
○ : correct color in incorrect position
_ : incorrect color
The order of the response tiles is sorted and does not necessarily match the position of the colored tiles.
Type !h during gameplay to read these instructions.
Type !q during gameplay to quit and show the solution.
change the game parameters
Edit the file params.py
to:
-
more pieces to guess
-
more/fewer turns per game
-
new colors
-
different emoji playing pieces
screenshot of gameplay
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 Distributions
Hashes for open_mastermind-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13639d9a1769b7dcfb97ce895bf710ffb074b29c59b99e6f4e8d877dd8a7862d |
|
MD5 | e8a970a9935b969e03aba0b2e6fd40a8 |
|
BLAKE2b-256 | 346990185f248c1896bb13443da034994ec12b3448ca728a6b53ef7ed77f5ce9 |
Hashes for open_mastermind-0.1.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 542aac9c7284f873ee2648e387d80b249c229f0f1e32acb514c82aff5c69e535 |
|
MD5 | 77ce7c2e5e1d0f1718248108611db046 |
|
BLAKE2b-256 | bda087c689855dc76f4b6d6b5f93cf240803bca8f6f9ac7e37f541220c0d506d |