Mastermind

Rules of the Game

• The computer picks a sequence of colors (the "code"). The code length is 4.
• The goal is to guess the exact positions of the colors in the code.
• Each color can only be used once.
• After you fill a line with your guesses and click the Check button, the computer responds with the result:
    - A red marker indicates a correct color in the correct position.
    - A white marker indicates a correct color in the wrong position.
• You win when all colors in the code are correctly placed. You lose if you run out of 10 attempts without guessing the code.

How to Play This Game

• Click New Game to start a fresh game.
• To place colors in your guess, click on the colored buttons at the bottom of the game.
• You can undo your last color placement by clicking the Undo button.
• The game prevents you from using the same color more than once in a row.
• When you've filled all four positions, the Check button will be enabled.
• Click Check to submit your guess and see the computer's response.
• Continue guessing until you solve the code or run out of attempts.
Enjoy the challenge!