This is a simple python code replicating the game Master Mind made by Mordecai Meirowitz in 1970. It's a 2 player game.
Note : The project MindMaster stills Work-In-Progress
Once you've opened the code, run it with a terminal and follow the console logs, you need to be 2. Firstly, one player needs to enter a code of 4 digits ( if it isn't, it'll show a warning in the console ), then the 2nd player needs to enter test codes to see if it's the one entered by the 1st player. Below the test code, there's an hint log telling if the number entered are presents in the code entered by the 1st player to help the other to find the code.
From source code :
- Open the
MasterMind.py
file - Run it on terminal with the key
F5
( on Visual Studio ) or find an optionStart debugging
- Follow the instructions in the terminal
You can change manually some settings like that :
The number in front of the code-line is the line where this part of the code is in the
MasterMind.py
file
### Change the number of tries allowed
90 tries = 5 # Set the number of tries allowed
### Change target code's length to make
21 if len(code) != 4: # Target code's length
Enter a 4 digit code :
- 7598
The code is : 7598
Enter a code to test :
- 1435
X X X X
The code contains : 5
You have 4 tries left
Enter a code to test :
- 7489
7 X X X
The code contains : 7 8 9
You have 3 tries left
Enter a code to test :
- 7598
7 5 9 8
The code contains : 7 5 9 8
You've found the code, good work !
- Reworked Logs
- An app to run it instead of runing it in the terminal and get a nicer UI
- A 1 player mode where the target code will be random
- Maybe letter support
- Customization settings ( tries, code format... )
- Reworked ReadMe on github with images and maybe videos ( And maybe add this project to a global github webpage with all my work )
Marage and Mordecai Meirowitz for the original idea
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.