Codebreaker is a logic game in which a code-breaker tries to break a secret code created by a code-maker. The code-maker, which will be played by the application, creates a secret code of four colours (Yellow, Red, Orange, Blue, Green, or White). The code-breaker then gets 10 chances to break the code. In each turn, the code-breaker makes a guess of four colours.

(Y)ellow, (R)ed, (O)range, (B)lue, (G)reen, or (W)hite

The code-maker then marks the guess with up to four + and - signs.

+ indicates one of the colours in the guess is the same as one of the colours in the secret code, and in the same position.
- indicates one of the colours in the guess is the same as one of the colours in the secret code, but in the wrong place.


For example, given a secret code YROB, a guess with YBGW would earn a +-. The + is for the Y in the first position in the guess, which matches the Y in the secret code in both colour and position: an exact match. The - is for the B in the second position in the guess, which matches the B in the code, but not in the same position: a colour match. The marker symbols are in no particular order, so we don’t know which numbers in the guess each refers to. If, for example, the mark is ++-, then we know that the guess has three colours that are part of the code, two of them are in the right positions, and one is in the wrong position. What we don’t know is which three are in the guess, which two are in the right position, nor which one is in the wrong position.

Last edited Jul 24, 2010 at 11:21 PM by Derek_Smyth, version 7

Comments

No comments yet.