LeventeWolf / ConnectFour

Console implementation of the game Connect Four | C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConnectFour

Console implementation of the game Connect Four in C

Featuring

Four different gamemodes:

  1. Two player (Player vs Player)
  2. One player (Player vs Computer)
  3. Computer Fight (Computer vs Computer)
  4. Practice (Player vs Player N games)

Computer movements were implemented with of Enhanced AI Technology

Insights

One player gameplay

One-player-mode

AI vs AI

Computer-vs-Computer-mode

Setup & Run

Prerequisite

The project contains CUnit Test cases. You must install it first.

sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev

Build

cmake -H. -Bbuild [-DCMAKE_BUILD_TYPE=Debug]
make -C build -j
./build/src/main/main
[./build/src/main/utest]
rm -rf build

Or with bash scripts:

./cmake.sh [Debug]
./main.sh
[./test.sh]
./clean.sh

(Give permissions to the script files)
(Commands in "[ ]" are optional)

If you want to run the scripts without "./" you can even add current directory to the PATH:

export PATH="$PATH:."

Configurations

If the TOKEN "⬤" is wider than your ascii characters, you can replace it with "O" in the board.h header.

Github link

https://github.com/LeventeWolf/ConnectFour

About

Console implementation of the game Connect Four | C


Languages

Language:C 95.5%Language:CMake 4.3%Language:Shell 0.3%