A fully playable Connect 4 game built in Python using Tkinter.
The project features a main menu window and a separate game window, demonstrating event-driven programming, GUI design, and structured game logic.
This project implements the classic Connect 4 game with a graphical user interface.
The application launches with a main menu, from which players can start a new game. Each game runs in its own window, handling turn-based gameplay and win detection.
- 🎮 Classic Connect 4 gameplay
- 🖥️ Graphical interface built with Tkinter
- 🪟 Separate main menu and game window
- 👥 Two-player local mode
- 🔄 Turn tracking and visual player indicators
- ✅ Win detection logic
- 🧠 Modular design with separated responsibilities
- Language: Python 3
- GUI: Tkinter (standard Python library)
- Libraries: No third-party libraries required
main.py– Application entry pointwindow1.py– Main menu window (start screen)game.py– Game window and core game logicREADME.md– Project documentation
Acts as the entry point of the application and launches the main window.
Contains the MainWindow class, which displays the title screen and allows the user to start a new game.
Contains the Game class, responsible for:
- Creating the game window
- Managing the board state
- Handling player turns
- Detecting win conditions
This separation improves readability, maintainability, and scalability.
- Python 3.8+
- Tkinter (included with most Python installations)
Clone the repository:
git clone https://github.com/your-username/connect-4-tkinter.git
cd connect-4-tkinter- Players take turns dropping discs into one of the columns.
- Discs fall to the lowest available slot.
- The first player to connect four discs in a row (horizontal, vertical, or diagonal) wins.
- A game window displays the current player’s turn and the game outcome.
- Object-oriented programming in Python
- Event-driven GUI programming
- Multi-window Tkinter applications
- Game state management
- Clean separation of UI and logic
- Use of class variables and instance state