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 boardInput 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 *.classSelect Your Symbol (
XorO)Players take turns entering positions
[1–9]on the boardPlayer 1always starts firstThe 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.