How to Play
Code Quest is a Mastermind style code-breaking game where one player (or the computer) sets a secret code of colored pegs, and the other player tries to guess it within a limited number of attempts.
Rules:
- The code consists of a set number of pegs (default 4), each one of several possible colors (default 6).
- You have a set number of attempts (default 10) to guess the code.
- After each guess, feedback is provided:
- Black peg: Correct color in the correct position.
- White peg: Correct color in the wrong position.
- The game ends when you guess the code (all black pegs) or run out of attempts.
Controls:
- Click a peg to cycle through available colors.
- In two-player mode, Player 1 sets the code and clicks "Set Code," then Player 2 guesses.
- In single-player mode, the computer sets the code, and you guess.