1001Ferramentas
🎯Games

Mastermind Cores

Adivinhe a sequência de 4 cores em até 8 tentativas.

Use dígitos 1-6. 🟢 = posição correta, 🟡 = cor correta, ❌ = errado

Cracking the code in eight guesses

You remember the colored-peg game, but you get stuck on one small question: what exactly counts as a partial hit? In this version the code has 4 slots and each one holds a digit from 1 to 6, so colors became numbers and you can type a guess instead of clicking pegs. Every guess adds a line to the history with its markers, and you get 8 tries to nail the whole sequence.

Feedback uses the classic consume-once rule. The code and the guess are compared slot by slot first, and each exact hit burns that digit on both sides; only the leftovers are then matched to find the partials. That is why guessing 1122 against the code 1234 returns one green and one yellow, not two yellows. Repeats are allowed when the code is drawn, so 5555 is possible: 1296 combinations in total.

Opening with two repeated pairs such as 1122 maps half the digits in one move. If your entry does not fit the pattern (fewer than 4 characters, or a 7), the button silently does nothing, with no error message, so check the field before assuming the page froze. Winning or hitting the eighth guess does not lock the input either, so use the Novo button (Portuguese for new) to draw a fresh code. Everything runs in your browser.

Frequently asked questions

How many colors and slots are there?
Four slots and six symbols, shown as the digits 1 to 6. Repeats are allowed, which gives 1296 possible codes.
What do the markers mean?
Green is a right digit in the right slot, yellow is a right digit in the wrong slot, and the X marks a digit that is not in the code at all.
Are eight guesses enough?
There is room to spare. Classic Mastermind with six colors and four slots can always be solved in five guesses with optimal play.

Related Tools