Mastermind is a code-breaking game normally played between two players. For my project, the user will play against the computer which will randomly select a code.
Rules of the Game
The Computer will select a code consisting of "pegs" of various colors. Each peg in the code will be one of 6 colors - Blue, Green, Orange, Purple, Red, and Yellow. Multiple pegs may be of the same color. Your objective is to correctly guess the code - i.e. you need to guess the correct color of the pegs and the correct order which they are in.
You will have 10 guesses. After each guess, you will be provided feedback on how accurate your guess was. For each peg in your guess which is of the correct color and in the correct position, the feedback will have 1 black peg. For each peg in your guess which is of the correct color but is in the wrong position, the feedback will have 1 white peg. Otherwise, the feedback will have a pink peg.
NOTE: The order of the feedback pegs does not correspond to neither the order of pegs in your guess nor the order of pegs in the code. In other words, the color of the feedback pegs is important, not their order.