Secret Code belongs to the family of two-number deduction games whose ancestor is the pencil-and-paper game known as Bulls and Cows — played since at least the nineteenth century, long before anyone printed it on a board. The computer hides a row of colours, you try to rebuild it, and after every guess you get two numbers only: how many colours you got right and put in the right place, and how many you got right but put somewhere else.
Luck has nothing to do with it. With those two numbers and a little method the code closes in on itself: every guess, even one that feels wasted, rules out a slice of the possibilities.
This game keeps evolving: new features and improvements are added regularly. If something doesn't work the way you expect, or you have a suggestion, write to postmaster@lucianomanenti.com — your feedback is welcome!
The computer picks a row of 4 or 5 slots and fills it with colours drawn from a palette of 6 or 8. You have to work out which colours and in what order, before you run out of guesses.
Every colour carries its own letter, A to H. That isn't decoration: it helps anyone who tells the shades apart poorly, and it is also the keyboard key that places that colour.
Everything on the board has its own kind of name, and no two clash: the slots of the code are numbered 1, 2, 3… across the top of the columns, the guesses are R1, R2, R3… down the left edge, and the colours are the letters. The same numbers head the columns of the possibility matrix, in the same order, so moving between the two needs no translation.
Small pins appear to the right of each guess. They are the only information the game gives you:
| Pin | Meaning |
|---|---|
| solid | a right colour, in the right slot |
| dark | a colour that is in the code, but you put it elsewhere |
Careful: the pins never say which slot they refer to. They are always listed in the same order (solid ones first, then dark ones), precisely so they don't give the position away. If they did, the game would be over in two moves.
Say the hidden code is C – A – A – E (green, red, red, orange). Here are three guesses and their answers:
Look at the second guess: purple shows up in no pin at all, so it is ruled out of the whole code. And the first one says red is in there but not in slot 1. Two certainties, and no guessing involved.
| Level | Slots | Colours | Guesses | Combinations |
|---|---|---|---|---|
| Easy | 4 | 6 | 10 | 1,296 |
| Classic | 4 | 8 | 10 | 4,096 |
| Expert | 5 | 8 | 12 | 32,768 |
The start dialog has a switch: «The code may repeat the same colour». Switched on, the code can hold the same shade twice or three times — and that is where the game turns tricky, because a repeated colour yields fewer pins than you would expect. Switched off (as it starts out), every colour appears once only: far fewer combinations, and the possibility matrix does much more of the work for you.
It is the block of white cells in the middle: one column per slot of the code (1, 2, 3…, the same numbers that head the guess columns, in the same order), one row per colour, its letter written on the pill at the left. It is where you write down what you have already deduced, so you don't have to hold it in your head.
The matrix is a notepad, not an oracle: the game keeps its hands off it and will happily let you cross out the right cell. Get a note wrong and the matrix will lead you astray — exactly as it would on paper. There are two checks, and each has to be asked for with its own checkbox: one looks only at the clues you have already been given, and hands you nothing you did not already hold; the other looks at the solution, and that is a real hint — which is why it starts switched off.
| Option | What it does |
|---|---|
| Warn me if my notes contradict the clues | It compares the crosses and assignments you entered by hand with the answers you have received. If none of the still-possible combinations respects your notes, then one of those marks is certainly wrong: the message turns red and, when there is a single culprit, it names the slot and the colour to go back over, and that cell lights up red in the matrix. It never looks at the solution, only at the clues you already hold. |
| Show how many combinations are left | Counts, one by one, every row still consistent with every clue. It is the honest measure of how much you are narrowing things down: a good guess cuts the number several times over. |
| Warn me if my notes contradict the solution | This is the one place where the game really does look at the code, which is why it starts switched off. If you have crossed out the right colour for a slot, or assigned a wrong one, the message turns red and names the slot and the colour you got wrong, and that cell lights up red in the matrix. It does not tell you which colour is the right one: that is still yours to find. |
The Hint button works in two steps, on the first slot you haven't settled yet:
The panel always states the price before revealing anything: you can close it without paying. The seconds are added to the clock, so a record set with hints stays comparable with the others.
The score in this game is the number of guesses; time is only the tie-breaker. The panel at the top right holds today's record, this week's and the all-time one, shown as guesses · time.
Records are kept separately per level and per the repeated-colours rule: without repeats the space is far smaller, and mixing the two scores would mean nothing. They stay on your own computer: nobody sees them and nothing is sent anywhere. The little ⟲ button clears them, with a confirmation so you can't wipe them by accident.
| Key | Action |
|---|---|
| A … H | place that colour in the slot under the cursor. The digits 1…8 still work too, in palette order |
| ← → | move the cursor along the row |
| ↑ ↓ | change the selected slot in the matrix |
| Enter | play the row |
| Backspace | remove the last colour placed |
| Delete | clear the whole row |
| S | turn Assign mode on or off (A is a colour now) |
| Esc | leave Assign mode, or close the hint |
Whatever row you open with, it brings information back. Many players open with two pairs (say A A B B): the pin count tells you at once how many of those two shades are in play.
Replay the same row with just two pegs swapped and the difference in the pins tells you something precise about those two slots. Change everything at once and you get a number you can't pin on anything.
The matrix is where the game is really won, and it is also where it goes wrong: one cross too many and you spend the rest of the game deducing from a falsehood without noticing. The «warn me if my notes contradict the clues» checkbox exists for exactly that: leave it on until spotting it yourself becomes second nature. Playing a row that cannot be the code, on the other hand, is no mistake at all: it is often the best way to shake loose the fact you need.
© 2026 Luciano Manenti