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.
- 🖱️ Interactive GUI with buttons
- 🔁 Reset functionality
- 👥 Two-player mode
- ❌❌ Win/tie detection
- 🎨 Responsive visual feedback on each move
TicTacToe/
│
├── src/
│ └── TicTacToe.java # Main game logic and GUI
│
└── README.md # Project documentation
- Java JDK (version 8 or above)
- IDE like IntelliJ IDEA, Eclipse, or just a terminal
- Clone or download the repository.
- Navigate to the
src
folder. - Compile the Java file:
javac TicTacToe.java
- Run the program:
java TicTacToe
- The first player is
X
, the second isO
. - 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.
- Java Swing components (
JButton
,JFrame
,JPanel
, etc.) - Event handling using
ActionListener
- Basic game logic and condition checking
- GUI layout management
This project is open-source and free to use for learning and development purposes.
- Inspired by classic console and GUI-based Java games.
- Built for learning Swing and Java event-driven programming.