A terminal-based code-breaking game Mastermind
Terminal-based python of classic board game Mastermind®
to get the game
pip from the command line:
pip install open-mastermind
And run with this command:
Although written in Python3.7, it's compatible back to Python2.7.
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
◍ : 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.
Solutions can be hashed and shared with other players. To generate a code for the solution
mastermind rgyb > Your code to play rgyb is 20419
Then share the code
20419 with the other player, who plays the desired game like this:
It's serverless and also on the honor system. Codes are generated on the fly based on the 16-bit CRC value.
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:
change the game parameters
Edit the file
more pieces to guess
more/fewer turns per game
different emoji playing pieces
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size open_mastermind-0.2.0-py3.7.egg (10.1 kB)||File type Egg||Python version 3.7||Upload date||Hashes View|
|Filename, size open_mastermind-0.2.0-py3-none-any.whl (6.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size open_mastermind-0.2.0.tar.gz (5.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for open_mastermind-0.2.0-py3-none-any.whl