A simple yet fully functional Tic Tac Toe game built using Java Swing. Designed for two players on the same device, this project is great for beginners looking to strengthen their understanding of Java, object-oriented programming, and GUI development.
- Two-player mode (Player X and Player O)
- Simple and intuitive GUI using Java Swing
- Win and draw detection logic
- Restart game functionality
- Clean and modular code structure
- Java Basics (variables, conditionals, loops)
- Object-Oriented Programming (classes, objects, methods)
- Arrays & 2D Arrays
- Java Swing (JFrame, JPanel, JButton, JLabel)
- Layout Managers (GridLayout, BorderLayout)
- Event Handling (button clicks)
- Game Logic Implementation
- GUI design principles for Java desktop apps
- Java
- XML
- Android Studio
- Make sure you have Java JDK installed (version 8 or above).
- Clone the repository:
git clone https://github.com/yourusername/tic-tac-toe-java.git
- Compile and run the game
cd tic-tac-toe-java/src
javac TicTacToe.java
java TicTacToe
- Add AI for single-player mode
- Add sound effects
- Score tracking
- Theme switching (dark/light mode)
This project is licensed under the MIT License.
Feel free to fork the repo and submit pull requests. Suggestions, bug reports, and improvements are always welcome!
Created by Thogaruchesti Hemanth – let's connect!