The object of the mastermind game is to guess the correct colors in the correct order. Wikipedia has more details about game play, the history of the game, and Donald Knuth's algorithm for solving in under five steps: https://en.wikipedia.org/wiki/Mastermind_(board_game) Braincurses is a ncurses implementation of this board game.