colding/MasterMind
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Mastermind++
C++ implementation the mastermind board game.
Build by:
./bootstrap
make
Then run the game in game/.
OVERVIEW:
This is a small program which will make the computer play one round of
MasterMind against the command line user.
The game has a minimalistic main file in game/ whose primary purpose
it is to parse the command line options, if any, and start the game
itself.
The game logic is all in a static library in src/. It consists of:
* mastermind.[h, cpp] - Main game file. Figures out whether the
computer is the code breaker or if it is the user.
* gameboard.[h, cpp] - A class containing the actual game rules. This
class is used no matter what role the computer has.
* code_breaker.[h, cpp] - Plays the role of code breaker. No attempt
has been made to use Knuths algorithm. All computer guesses are
purely random.
* code_maker.[h, cpp] - Plays the role of code maker.
The subdirectory cmdline/ contains a copy of my GitHub project
"argopt". This is used to parse command line options.
TODO:
* Add nice GUI.