Connect 4 is a simple game object of which is to i drop some coins into a grid until you or your oponent create a pattern of 4 adjacent coins in a row, column or doagonal.
This is a simple student project made in C with a dash of OpenGl.
Install dependencies
sudo add-apt-repository universe
sudo apt update
sudo apt install build-essentials
sude apt install freeglut3-dev
Build
make
Build
make
To launch a basic game where users starts first and default level of search depth (5):
./CONNECT_4
To launch a game with different setups:
./CONNECT_4 game_mode search_depth
Game modes:
0
- Computer plays first.1
- Default - User plays first.2
- Two players mode.3
- Not sure what that one does 🤖
Search depth - integer defining how deep will the state graph be evaluated.
While in game, pressing these keys will:
j
- Switch to 2 player mode.ESC
- Exit the game.