logo JavaScript Codebreaker

JavaScript Codebreaker

How to Play Codebreaker

Correctly guess the randomnly generated code created by the computer. This code is represented by a number of coloured pegs, the number of which is dependent of the level of play selected.

Use the coloured buttons at the bottom of the screen to fill in a row of coloured pegs and press 'Go' to confirm your selection.

The computer will analyse your pegs and respond with clues:-

  • 'Color' reveals how many correct colours you have selected.
  • 'Place' reveals how many colours you have in the correct place.

You can choose to play allowing either unique colours or duplicate colours within the code. The game is set by default to allow only unique colours.

A note about the peg designs: from left they are the the flags of St George, St Andrew, the Isle of Man, St Patrick, the Celtic Cross, Guernsey and the United Kingdom of Great Britain and Northern Ireland. The photo is of the southern stone row leading into Avebury henge, Wiltshire, England.

Strategies

Instead of initially using unique and individual pegs, it can be advantageous to find all the colours first by creating lines of one type of peg, and then assembling them to work out their correct places. This works because the process of finding the correct colours gives you clues to their placement whilst doing so. The drawback is that you will gain a high win average, probably around 7 to 8.

Statistics

The statistics are saved in a cookie. If you would like to reset the cookie click here.

Licence

The graphics and source code are © Thunor 2007 and licenced under the GNU GPL.

Downloads

jscb-20070727.tar.gz.


Valid HTML 4.01 Transitional blank1x1 Valid CSS! blank1x1 Get Firefox! blank1x1