Connect Four

Introduction

Connect Four is a classic two-player strategy game where you try to connect four of your colored discs in a row before your opponent does. This version features AI opponents using the minimax algorithm with alpha-beta pruning, offering a challenging single-player experience.

Gameplay

Take turns dropping colored discs into a 7-column, 6-row vertical board. The disc falls to the lowest available slot in the chosen column. Win by connecting four discs horizontally, vertically, or diagonally before your opponent does.

Controls

Click on a column to drop your disc into it. Watch the preview to see where your disc will land. Plan your moves strategically to block your opponent while creating your own winning line.

Copyrights

source code