Skip to content

A C++ Connect Four game made with SFML(Simple and Fast Multimedia Library), SFGUI and Thor. The AI is implemented using a modified negamax algorithm and threads. Features difficulty and token color selection.

License

Notifications You must be signed in to change notification settings

JevinJ/ConnectFour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConnectFour

A C++ Connect Four game made with SFML(Simple and Fast Multimedia Library), SFGUI and Thor. The AI is implemented using a modified negamax algorithm and threads. Features difficulty and token color selection.

Prerequisites

Software you'll need to install, be sure to setup PATH variables:

  • MinGW
  • mingw32-make or make

Optional, for development:

Building

Clone or download the project. Open command prompt or terminal and cd to the project folder root where the makefile resides.

CMD: cd C:/full/path/to/ConnectFour/
Terminal: cd /full/path/to/ConnectFour/

To build all, run mingw32-make (or regular make):

mingw32-make all

To clean all:

mingw32-make clean

If there are no errors with the build, you can now navigate to /bin/ and run the executable.

Builing tests

Build shared Boost.Test library with "toolset=" command.

Example with gcc 7.2.0: 
> cd $boost_path
> bootstrap.bat
> b2 address-model=64 architecture=x86 --with-test link=shared toolset=gcc-7.2.0 --prefix=your_output_folder install

Go to the location of the built DLL files and move the unit test framework dll to the ConnectFour/bin/ folder. If built with the above command the name of the file would be "libboost_unit_test_framework-mgw72-mt-x64-1_66.dll".

Run mingw32-make (or regular make) with the following arguments:

mingw32-make tests BOOST_PATH=your/path/here/ BOOST_TEST_DLL=your_dll_name_here
  1. BOOST_PATH: The path of the folder where you unzipped boost, for example: if you unzipped boost in C:/ you would put C:/boost(version_number_here).
  2. BOOST_TEST_DLL: The name of your compiled unit test framework DLL file without the suffix, for example: "libboost_unit_test_framework-mgw72-mt-x64-1_66"

If there are no errors with the build, you can now navigate to /bin/ and run AllTests, with or without commands.

Built With

  • SFML - Graphics framework.
  • SFGUI - Graphical menu interface.
  • Thor - Resource management.
  • CTPL - C++ Thread pool library.

Authors

  • Jevin Jones - Initial work - JevinJ

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A C++ Connect Four game made with SFML(Simple and Fast Multimedia Library), SFGUI and Thor. The AI is implemented using a modified negamax algorithm and threads. Features difficulty and token color selection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published