1# BrainCurses 2 3A simple code-breaking game. 4 5The object of the game is to guess the correct colors in the correct order. 6[Wikipedia][] has more details about game play, the history of the game, and 7Donald Knuth's algorithm for solving in under five steps. 8 9## Game play 10 11The interface is rather simple to master. Simply type the first letter of the 12color you would like to guess for each position. For example, I want to guess 13the color red first. I will type 'r' which will be completed to 'red' and the 14input cursor advanced to the next field. Continue until you have selected four 15colors. The available colors are displayed in the information panel on the 16right. 17 18After the fourth color has been selected the input window will clear and some 19markers will be displayed on the left window. A red 'X' signifies one of your 20selections was both the correct color and the correct position; whereas a white 21'X' signifies only the correct color. Be advised, the markers are filled from 22the left starting with any reds and then whites. This means that a red 'X' in 23the first column does not necessarily mean that your guess in the first column 24was the correct color and position. 25 26You have, by default, ten guesses before the secret code will be revealed. If 27you have not already guessed the secret code after the tenth guess you lose the 28game. 29 30## Installation 31 32First you need to compile the binary. The prerequisites are: 33 34 - Ncurses 35 - make 36 - a C++ compiler 37 38`make` 39 40The game works the best with a dark background and white foreground. If you're 41using a custom color scheme, e.g., solarized, the colors may not be easy to 42distinguish. 43 44[WikiPedia]: https://en.wikipedia.org/wiki/Mastermind_(board_game) 45 "Mastermind" 46