MasterMind Fortran game
October 30, 2025 ยท View on GitHub
This is the classic MasterMind game in modern Fortran 2008. Some of the other Mastermind Fortran games out there have subtly incorrect game logic, but this one is believed correct.
Usage
Simply type
mastermind
You can play with more than 4 letters by specifying at the command line. Say you want 8 letters:
mastermind 8
B
: the correct color is in the right position
W
: the color is used, but this guess is in the wrong position
0
: this color is not used in the solution anywhere not already B
Install
Pick one of the following methods.
Compile
cmake -B build
cmake --build build
# optional
cmake --install build
OR
meson build
meson install -C build
Homebrew / Linuxbrew
brew tap scivision/tap
brew install mastermind