Welcome to the Tic-Tac-Toe Game repository!
This is a simple console-based implementation of the classic Tic-Tac-Toe game written in Java. It allows two players to play the game turn by turn on the same machine.
- Command-line based interface
- Two-player mode (Player X and Player O)
- Input validation and error handling
- Win, draw, and continue conditions handled
- Clean and modular codebase
- Language: Java
- IDE: You can use any Java IDE like IntelliJ IDEA, Eclipse, or simply a terminal with
javacandjavacommands.
Tic-Tac-Toe-Game/
โ
โโโ TicTacToe.java # Main game logic and execution class
โโโ Board.java # Handles board display and move operations
โโโ Player.java # (Optional class if used to define player details)
โโโ README.md # Project description
---
## โ
How to Play
1. **Clone the repository**
```bash
git clone https://github.com/Mrutunjaya-Panda/Tic-Tac-Toe-Game.git
cd Tic-Tac-Toe-Game
2. Compile the Java Files
3. Run the game
Sample Output:-
Welcome to Tic-Tac-Toe!
Player X goes first.
Current Board:
_ _ _
_ _ _
_ _ _
Player X, enter your move (row and column): 0 0
Current Board:
X _ _
_ _ _
_ _ _
Player O, enter your move (row and column): 1 1
Current Board:
X _ _
_ O _
_ _ _
Player X, enter your move (row and column): 0 1
Current Board:
X X _
_ O _
_ _ _
Player O, enter your move (row and column): 2 2
Current Board:
X X _
_ O _
_ _ O
Player X, enter your move (row and column): 0 2
Current Board:
X X X
_ O _
_ _ O
๐ Player X wins!Created with ๐ก by Mrutunjaya Panda