A cross-platform Connect Four game for the terminal.
- 3 Game Modes (Player vs. Player, Player vs. Computer, Computer vs. Computer)
- AI using NegaMax algorithm with alpha beta pruning and Zugzwang awareness
- Colored console output
- CMake
- Terminal with color support
git clone https://github.com/MaxMutantMayer/connect-four.git
cd connect-four
mkdir build && cd build
cmake ..
make
- Run CMake GUI and specify paths to source and build directory, e.g.
C:/Games/connect-fourandC:/Games/connect-four/build. - Click
Configureand choose wished toolchain - Click
Generateto create VS solution - Open solution and build
connect_fourproject
VS 17 introduced built-in support for CMake. Simply open the project via File -> Open -> CMake.. to build and run it.
You can either use in-game menus or program arguments to specify settings.
Usage:
connect_four <Options>
Options:
None: Use program with in-game menus
--pvp: Play PlayerVsPlayer GameMode
--pvc: Play PlayerVsComputer GameMode
--cvp: Play ComputerVsPlayer GameMode
--pvp: Play ComputerVsComputer GameMode
--alphabeta: Disable alpha beta pruning
--difficulty <easy|normal|hard>: Specify AI difficulty
