Code Breaker

Crack the 4-color secret in 10 tries

Code Breaker is a deduction puzzle in the spirit of the classic peg game. The computer hides a secret sequence of four colours chosen from a palette of six, and colours may repeat. Your job is to uncover it in ten attempts.

Each round you build a four-peg guess from the palette and submit it. The game replies with black pegs for pegs that are the right colour in the right spot, and white pegs for right colours in the wrong spot - the standard Mastermind scoring where every secret peg is counted at most once. That feedback is your only clue, so each guess should test a hypothesis.

A running history shows every past guess beside its black-and-white result, turning the board into a logic workbook you can reason over. Tap any placed peg to remove it, use Undo to step back, or press keys 1 to 6 to drop a colour instantly. On a loss the secret code is revealed so you can see how close you were.

Like every game on the site it ships as a single self-contained file: no download, no account, no tracking, and it plays fully offline on both desktop and phone.

How to play

  1. The computer picks a hidden 4-colour code (colours can repeat).
  2. Tap a colour to add it to your guess, then Submit when four pegs are placed.
  3. Read the feedback: black = right colour + right spot, white = right colour, wrong spot.
  4. Use the clues to narrow down the code; crack it within 10 tries to win.

Controls

  • Palette swatches or keys 1-6: add that colour to the guess
  • Tap a placed peg: remove it
  • Undo button or Backspace: remove the last peg
  • Submit button or Enter: lock in the guess

Tips

  • Open with a guess of four different colours to learn which hues are present.
  • A peg that stays black should be locked in place on the next guess to confirm position.
  • When only whites appear, rotate the known colours across slots to locate each one.

Frequently asked questions

Can the same colour appear more than once?

Yes. The secret code is four colours drawn from six, and repeats are allowed.

What do the black and white pegs mean?

Black pegs mark correct colour in the correct position; white pegs mark correct colour in the wrong position.

What happens if I run out of guesses?

The round ends and the secret code is shown so you can see how close your deductions came.

More games