Skip to content

Flat-Earther/conect4-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Connect4

Fully functional Connect4 game with AI opponent written in C++ and SFML.

Controls

  • Click on a column to place your piece.
  • Play against AI.
  • The AI uses a simple strategy to block or win when possible.

Hidden feature

Pressing R resets the board.
Pressing U undoes the last move. Useful when experimenting with AI strategies or testing.

Building and Running

This project is built with Visual Studio on Windows.

  1. Install dependencies:
  1. Open the project:
  • Open Connect4.sln in Visual Studio.
  1. Set up SFML:
  • Make sure SFML_library/include is in Project > Properties > C/C++ > General > Additional Include Directories.
  • Make sure SFML_library/lib is in Project > Properties > Linker > General > Additional Library Directories.
  • Link required SFML libraries in Linker > Input > Additional Dependencies.
  1. Build and run:
  • Choose the Debug or Release configuration.
  • Press F5 or Run to start the game.

Attributions

About

A simple connect4 game writen in C++ with AI enemy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors