Connect Four is a classic 2-player connection game in which the players first choose a color and then take turns dropping colored discs into a 6×7 grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own discs.
- Python 🐍
- Pygame 🎮
- Interactive GUI using Pygame
- Turn-based gameplay for two players
- Win detection (horizontal, vertical, and both diagonals)
- Board resets after a win
- Visual and text-based feedback
- Install Pygame:
pip install pygame python connect_four.py
🕹️ How to Play
The game opens with a 7x6 grid.
Player 1 uses Red, Player 2 uses Yellow.
Click on the top of a column to drop your piece.
The first player to align four of their pieces horizontally, vertically, or diagonally wins.
✨ Future Improvements
Add AI opponent using Minimax algorithm
Add score tracking and game history
Add background music and sound effects
Export as a standalone executable
📄 License
This project is for educational purposes and personal use. Feel free to use and modify it!
🙋♂️ Author
Made with ❤️ by Krishna Singh.
