This game looks best on a dark terminal background, but should work on lighter ones with minimum modification.
- Clone the repo
cd mastermind
python3.9 -m venv ./venv
source venv/bin/activate
pip install -r requirements/base.txt
python mastermind.py
source venv/bin/activate
pip install -r requirements/dev.txt
pytest .
- You'll be asked how long of a sequence to generate.
- The standard game is 4.
- You'll be asked how many guesses you should be allowed.
- The standard game is 10.
- Your goal is to guess the sequence in that number of guesses.
- The game will ask you for your color sequence one at a time.
- It will ask you to confirm your guess before scoring it.
-
A green peg means you have the correct color in the correct position.
-
A yellow peg means you have the correct color in the wrong position.
-
The scoring pegs are sorted. They don't correlate to the position of your colors.
In a 4 sequence game:
- 4 yellow pegs means you have all the colors, but in the wrong positions.
- 2 green and 2 yellow pegs means you have all the colors right, but two are in the wrong position.