Mastermind is a code-breaking game that involves two players, one who creates a secret combination of colored pegs and the other who attempts to guess the combination within a limited number of attempts. The secret combination consists of a sequence of colored pegs, and the player attempting to guess the combination makes a series of guesses, with feedback given on the accuracy of each guess. The feedback is usually in the form of two types of pegs: black and white. A black peg indicates that a guessed peg is both the correct color and in the correct position, while a white peg indicates that a guessed peg is the correct color but in the wrong position. The game continues until the guessing player correctly identifies the secret combination or runs out of attempts.