This is a desktop version of the classic Connect Four game implemented in Python using the Pygame library. The game allows two players to take turns dropping pieces into a 7x6 grid. The first player to align four of their pieces in a row—horizontally, vertically, or diagonally—wins the game.
- Run the game.
- Player 1 (red) and Player 2 (yellow) alternate turns.
- Click a column to drop your piece.
- First to 4 in a row wins!
connect4pygame/
├── board.py # Game logic (drop, check win, validate move)
├── constants.py # Visual and dimensional constants
├── game.py # Game loop and rendering logic
├── main.py # Entry point that starts the game
Make sure Python and pygame are installed:
pip install pygamepython3 main.py- Turn-based 2-player gameplay
- Color-coded tokens (red and yellow)
- Win detection in all directions
- Graphical interface using Pygame
- Add AI opponent
- Add restart/undo buttons
- Sound effects or animations
- Python 3.8+
- Pygame
This project is for educational use. Feel free to modify or extend it.