A minimal, simple, terminal-based Tic-Tac-Toe game written in Java, supporting two-player gameplay with colored, clean console output, input validation and win patterns (row, col, main-diagonal, anti-diagonal).
-
Classic
3×3Tic Tac Toe board -
Input validation to prevent invalid or duplicate moves
-
Automatically detects win, draw, or ongoing game
-
Colored, clean and readable console-based UI
-
Minimal and lightweight
Java8 or higherterminalorCLIinterface
cd ~/Desktopgit clone https://github.com/manakcodes/tic-tac-toe-java.gitcd path-to/tic-tac-toe-java/javac Main.javajava Mainrm *.class-
Select Your Symbol (
XorO) -
Players take turns entering positions
[1–9]on the board -
Player 1always starts first -
The game ends when :
- player gets 3 in a row (row, column, or diagonal), OR
- The board is full (draw)
This project is licensed under MIT License.