/mastermind-console

Play MasterMind in console / terminal

Primary LanguageCMIT LicenseMIT

mastermind-console

This repository shows how the game MasterMind could look like in terminal/console.

How to build this project

Compiling in Visual Studio 2017

Just copy all three files (mastermind.c, mastermind.h and main.c) in a VS Project and then run the code with hitting F5.

Compiling and running MasterMind in Linux

On Linux machines we use the curses library. In order to compile MasterMind, make sure the curses developer library is installed. The package name may differ on each system, but here are the commands and the package name(s) for apt, dnf and yum:

$ sudo apt-get install libncurses5-dev libncursesw5-dev -y
$ sudo dnf install ncurses-devel -y
$ sudo yum install ncurses-devel -y

Make sure all files (mastermind.c, mastermind.h and main.c) are in one directory and compile it with gcc:

$ gcc -o mastermind mastermind.c main.c -Wall -lcurses

Now run it with following command:

$ ./mastermind

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details