~/projects/connect-4-game/

Connect-4

Feb 15, 2022 #python#game

Connect-4 in Python, played in the terminal.

Purpose

Connect Four is a two-player strategy game: players take turns dropping pieces and try to align four horizontally, vertically, or diagonally. This Python project implements the rules without a graphical interface, keeping the board, moves, and win conditions visible in code.

How it plays

The board has six rows and seven columns. A player chooses a column, and the piece occupies its lowest empty cell. After each move, the game checks for four pieces from one player horizontally, vertically, and in both diagonal directions. A full board with no winner is a draw.

Technical focus

The program manages board and moves with array/data-frame structures and checks wins in four directions. It has no graphical or online mode. This terminal project focuses on turn-based game logic and state tracking.

← cd ..