Pilot
30f54f438f
- Updates `calc` to return if the user won. - We can then look at the status (win) and continue the loop instead of falling through to the "Try again?..." section. - Adds continuation after a caught error to prevent the secret from resetting - Empties the `secret` before regenerating it. - `generateSecret() appends to the secret so the second game had a len(secret) of 8 - This caused the compare function to out of bounds on the `guess` array. - Changed the output formatting of the hit to help readability. - Some ideas - setting a variable to a length of 4 and referencing that in generateSecret, checkGuess, and compare would allow changing the difficulty, example: - Easy: length 5 - Medium: length 6 - Hard: length 8 - Ask the user for a difficulty before the start of the game. |
||
---|---|---|
LICENSE | ||
README.md | ||
main.py |
README.md
pystermind
A Python version of the Mastermind guessing game.
How it works
User starts it in Python (with source) or with the built executable.
How to play
Guess the correct sequence of 4 colors.
This version has 4 colors to choose from. You'll likely be able to change it yourself and configure how hard or easy the game is.
That's for another commit.
Remember...
Don't forget to be wholesome. This world is hard enough as it is.