A fully featured Tic Tac Toe game built with Java Swing, allowing two players to play multiple rounds with name, symbol, and theme customization.
- 🎨 Graphical Interface using Java Swing
- 👥 Two-player support with custom name input
- ✏️ Player symbol selection (X or O)
- 🔁 Multiple round system with score tracking
- 🔄 Ask who starts each round for fairness
- 🌗 Dark Mode / Light Mode toggle
- ✅ Win & draw detection with color highlights
- 🧮 Scoreboard tracking:
- Player wins
- Draw count
- ❌ Exit button to close the game
- ⏱️ Automatic reset between rounds
- Language: Java
- GUI: Java Swing
- IDE: Recommended: IntelliJ IDEA, Eclipse, or any Java-supported IDE
-
Clone this repository or copy the code into a
.javafile (e.g.TicTacToeGUI.java). -
Compile and run using your preferred IDE or terminal:
javac TicTacToeGUI.java java TicTacToeGUI
-
The GUI will launch and prompt you for:
- Player names
- Symbol selection (X or O)
- Number of rounds
- Who starts first each round
- The game ends automatically after the final round.
- The win condition is visually indicated by green-highlighted winning cells.
- Dark mode affects the entire interface, including buttons and text.
- 🔊 Add sound effects for clicks and win events
- 🤖 Implement a single-player mode with AI
- 📁 Export match history or scores to a file
- 🎨 Add theme customization (colors, fonts)
Made with ❤️ using Java Swing.
This project is licensed under the MIT License – feel free to use, modify, and distribute.



