The game involves guessing a secret multi-digit number on successive attempts. Every one of the digits of the secret number will be randomly generated.
On each attempt, you will enter a number. The program will compare the secret number with the attempt typed and will offer the following information on the screen:
- How many digits match and are in their position (correct)
- How many digits match, but they are not in their position (half correct)
-
You will need to set the difficulty:
- Basic (3 digits --> [0-4], 6 attempts)
- Normal (4 digits --> [0-5], 8 attempts)
- Hard (5 digits --> [0-9], 10 attempts)
-
Then select if you want repeated digits on your secret number or not
-
Finally, the game will start with the selected configuration. Enjoy!
You must have installed Python 3.8.5 or higher, then, you only need to open a shell and launch mastermind_class.py file.