Skip to content

Console implementation of the game Connect Four | C

Notifications You must be signed in to change notification settings

LeventeWolf/ConnectFour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published