This project is a Python-programmed simulation of the classic board game Connect-4. It allows a single player to challenge a computer opponent with a hard-coded AI directly in the terminal. The game aims to provide an interactive experience for playing Connect-4 against an automated player.
- Single-Player Mode: Play against a computer AI opponent.
- Hard-Coded AI: The computer opponent makes strategic moves based on its programmed logic.
- Interactive Gameplay: Place your tokens on the Connect-4 grid directly from your command line interface.
- Game Board Display: Visual representation of the Connect-4 board in the terminal.
- Win Condition Detection: The game logic determines when a player or the AI has achieved four in a row, declaring a winner.
Connect-4.py: This is the main Python script that contains all the game logic, including the board representation, player input handling, AI decision-making, move validation, and win condition checks.README.md: This file provides an overview of the project, its features, and instructions on how to set it up and play.
To run the Connect-4 game on your local machine, follow these simple steps:
- Clone the repository: Open your terminal or command prompt and run:
git clone https://github.com/TylerFortune/Connect-4
- Navigate to the project directory:
cd Connect-4 - Run the game: Make sure you have Python (version 3.x is recommended) installed, then execute the main script:
The game will launch in your terminal, and you can follow the on-screen prompts to play against the AI.
python Connect-4.py