Mastermind
Mastermind in Python
The classic game of Mastermind is now implemented in Python, meaning you can play the codebreaking game in the comfort of the console.
Rules
The computer has generated a random code - you have to guess it!
Enter your guess as a string of 4 letters, where each letter stands for a color.
Ex. rgbp stands for red, green, blue, and purple from the left to right slot respectively
Here is the complete list of color notation:
Red: r
Blue: b
Green: g
Orange: o
Purple: p
White: w
Red: pin in the right position with correct color
White: pin in wrong position with correct color
Example
Features
- Color terminal interface
- Automatic guess enforcement
- Accurate guess evaluation
- Turn and score tracking
Is your mind ready for Mastermind? Find out now!
Hooh, this is tough
@SixBeeps Try starting with all one color (I normally do red) and then when you get at least one right, add a second color and mess around with the order until you get all of the correct colors in the right places and then add a third color and so on.
Great work! Finally, a terminal game that isn't garbage
- EEEEEE
@MrEconomical Thanks!
@MrEconomical much E
I was making an HTML mastermind game, then this came out. Well done though.
4 on the first!
Look if you don't believe me
https://storage.googleapis.com/replit/images/1582421950077_6a248319d1d554599c346bc3cbd841db.png
i got it in ten on my first try
@AS06GH i got 8
this is awesome
i dont get how it works
@CodingClubber @AS06GH Great job!
@CodingClubber Check out the logic in evaluate()
nice game!
I've always enjoyed this game. Also, great job on making it in Python! By the way, I got it in 3.
3 red on my first guess, what are the odds?
rgbo
rgbb
rggo
rrbo
This is awesome! Great job!
hahahahah nice bro!
This game doesn't work once I get past the loading screen
@Powerpasta Try running the program
woo 3 turns!!
rbgp
rbgo
rbwp
Amazing!!!