Skip to content

ArjunPatil15/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe – Java Swing GUI Game 🎮

This is a simple Tic Tac Toe game built using Java with a Graphical User Interface (GUI) powered by Swing. It allows two players to play the game on the same computer.


🛠 Features

  • 🖱️ Interactive GUI with buttons
  • 🔁 Reset functionality
  • 👥 Two-player mode
  • ❌❌ Win/tie detection
  • 🎨 Responsive visual feedback on each move

📂 Project Structure

TicTacToe/
│
├── src/
│   └── TicTacToe.java      # Main game logic and GUI
│
└── README.md               # Project documentation

🚀 Getting Started

Prerequisites

  • Java JDK (version 8 or above)
  • IDE like IntelliJ IDEA, Eclipse, or just a terminal

Running the Game

  1. Clone or download the repository.
  2. Navigate to the src folder.
  3. Compile the Java file:
javac TicTacToe.java
  1. Run the program:
java TicTacToe

🎮 How to Play

  • The first player is X, the second is O.
  • Players take turns clicking the buttons to mark their symbol.
  • The game announces the winner or a tie.
  • Click Reset to start a new game.

📸 Screenshots

Screenshot 2025-02-10 115941
Screenshot 2025-02-10 115923
Screenshot 2025-02-10 120008


📌 Concepts Used

  • Java Swing components (JButton, JFrame, JPanel, etc.)
  • Event handling using ActionListener
  • Basic game logic and condition checking
  • GUI layout management

📃 License

This project is open-source and free to use for learning and development purposes.


🙌 Acknowledgments

  • Inspired by classic console and GUI-based Java games.
  • Built for learning Swing and Java event-driven programming.

About

A simple two-player Tic Tac Toe game built with Java and Swing GUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages