A simple Tic Tac Toe game implemented in Java with a GUI. This game allows two players (Player X and Player O) to take turns and play on a 3x3 grid. The current player's turn is displayed, and the grid updates with an image for each player's move.
- Two-player mode (Player X and Player O).
- A graphical user interface (GUI) with a 3x3 grid of buttons.
- Displays current player's turn at the top.
- Game automatically detects win or draw conditions.
- Run the game.
- Player X starts by clicking any empty cell on the 3x3 grid.
- Player O then takes their turn by clicking an empty cell.
- The game alternates turns between Player X and Player O.
- The game ends when one player wins, or if all cells are filled resulting in a draw.
-
Clone the repository or download the files.
-
Ensure you have Java installed on your machine (JDK 8 or higher).
-
Compile the Java code:
javac TicTacToe.java