shifr

Rules

The secrets

Four or five digits, decided when the match is made. A secret may start with a zero — 00417 is a valid five-digit secret. You choose the number your opponent has to break, and they choose yours. Nothing is refused for looking too easy or too obvious, because a refusal would hand the guesser a free deduction.

Repeated digits

Whether a secret may use a digit twice is agreed with the length, and you can read it on a lobby row before you take it. Under Repeats allowed it may: 6067 and 1111 are both fair choices. Under All different neither secret repeats one, which leaves 5,040 four-digit numbers instead of 10,000 — a deduction both players start with.

A guess may repeat a digit in either format. 1111 is a legal probe in an all-different match, and a cheap way to ask whether a 1 is in the secret at all.

Marking

Every guess is marked position by position: green for the right digit in the right place, amber for a digit that is in the secret but elsewhere, grey for a digit that is not in it at all. That is the whole of the rule, and the one thing a format changes is how much of it you are shown. The examples below are from a match that allowed repeats, because a repeat is what the rule has to be careful about.

Secret 11234, guess 43211:

4
3
2
1
1

Every digit of this guess is in the secret, and only the 2 is where it belongs. Amber says right digit, wrong place — it never says which place, so a row of amber still leaves you the ordering to work out.

Secret 11234, guess 51111:

5
1
1
1
1

The secret holds two 1s. One guessed 1 lands in place and takes green, the next claims the other and turns amber, and the two after it find nothing left to claim. A digit is never credited more times than it occurs, and green is settled before amber — a digit in the right place is never spent on a copy elsewhere.

Two formats

How the marking reaches you is agreed with the clock and the secret length, before either player has guessed. Per position colours the digits where they stand, as above. Totals only gives you the same marking as two numbers — how many digits are exact, how many are in the secret but misplaced — and leaves which ones to you.

Secret 11234, guess 43211, answered both ways:

Per position
4
3
2
1
1
Totals only
4
3
2
1
1
14

Both rows say the same thing about the same guess. The second says it without telling you where, so what you have worked out stays in your head instead of on the board — and the keypad stays plain for the same reason, because there are no positions to colour a key from. Both players play the same format, and you can read it on a lobby row before you take it.

Taking turns

You guess one after the other. Who moves first is drawn at random when the match is made, and a rematch gives the first move to the other player. A guess made out of turn is refused and costs nothing.

The clock

Guesses are unlimited; time is not. Each player has their own clock, agreed before the match. Both run while you are still choosing secrets, and pressing ready stops yours. From then on only the clock of the player on the move runs, so an opponent who takes their time spends their budget and not yours. Running out of time loses the match.

Winning

The first decisive event ends it: whoever breaks their opponent's secret first wins, a player whose clock reaches zero loses, a player who resigns loses, and a player who stays disconnected past the grace period forfeits. The one draw left is a match in which neither player ever chose a secret — those two clocks reach zero together. Guess count is recorded and decides nothing.

What you see of your opponent

Their guesses in full, answered in the match's format — marked digits, or the two numbers, whichever both of you are playing. It gives nothing away: they are guessing at the number you chose, so you could have marked every one of their rows yourself. The two secrets stay hidden until the match ends, and then both are revealed.