A Java Swing implementation of the classic Tic Tac Toe game featuring an interactive GUI, menu controls, keyboard shortcuts, and a live scoreboard.
Tic Tac Toe is a desktop-based Java application that recreates the classic two-player game using Java Swing. The program provides a clean graphical interface where players can take turns placing X and O, while the game automatically detects wins, ties, and updates the scoreboard in real time.
This project highlights core object-oriented programming principles, event-driven programming, and GUI development in Java.
- Interactive 3x3 Tic Tac Toe board
- Two-player gameplay
- Automatic win detection
- Tie detection
- Live game status display
- Scoreboard tracking:
- X wins
- O wins
- ties
- Menu options for:
- starting a new game
- resetting the scoreboard
- quitting the application
- Keyboard shortcuts for faster interaction
- Color-coded moves for better visual feedback
The application follows this workflow:
- Launch the game window
- Player X starts first
- Players alternate turns by clicking empty cells
- The game checks for:
- a winner
- a tie
- The scoreboard updates automatically
- Users can start a new game or reset the score from the menu
- Language: Java
- Framework: Java Swing
- Core Concepts Used:
- object-oriented programming
- inheritance
- event handling
- GUI design