Skip to content

A fully functional Tic Tac Toe game built in Java for two players on the same device. Designed for hands-on learning of core Java concepts, object-oriented programming, and GUI development. Ideal for beginners exploring Java through small projects.

License

Notifications You must be signed in to change notification settings

Thogaruchesti-hemanth/Tic-Tac-Toe

Repository files navigation

🎮 Tic Tac Toe - Java (Two Player Game)

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.


🖥️ Demo

Tic Tac Toe Screenshot


🚀 Features

  • 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

📚 Topics Covered

  • 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

🧑‍💻 Technologies Used

  • Java
  • XML
  • Android Studio

🛠️ How to Run

  1. Make sure you have Java JDK installed (version 8 or above).
  2. Clone the repository:
git clone https://github.com/yourusername/tic-tac-toe-java.git
  1. Compile and run the game
cd tic-tac-toe-java/src
javac TicTacToe.java
java TicTacToe

🧩 Future Improvements (Optional)

  • Add AI for single-player mode
  • Add sound effects
  • Score tracking
  • Theme switching (dark/light mode)

📜 License

This project is licensed under the MIT License.


🙌 Contributing

Feel free to fork the repo and submit pull requests. Suggestions, bug reports, and improvements are always welcome!


📬 Contact

Created by Thogaruchesti Hemanth – let's connect!

About

A fully functional Tic Tac Toe game built in Java for two players on the same device. Designed for hands-on learning of core Java concepts, object-oriented programming, and GUI development. Ideal for beginners exploring Java through small projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages