Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

manakcodes/tic-tac-toe-java

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tic-tac-toe-java

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).

🧊 Gameplay Features

  • Classic 3×3 Tic 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

📋 System Requirements

  • Java 8 or higher
  • terminal or CLI interface

🏗️ Tools And Tech Used

Java IntelliJ IDEA VS Code bash GitGitHub

🛠️ Project Setup

1. Navigate To The Directory Where You Want To Clone The Project Repository (example: Desktop)

cd ~/Desktop

2. Clone the Project Repository

git clone https://github.com/manakcodes/tic-tac-toe-java.git

3. Navigate To The Project Repository

cd path-to/tic-tac-toe-java/

4. Compile The Project

javac Main.java

5. Run The Project

java Main

6. Run The Following Command To Clear Build Artifacts (optional)

rm *.class

❓ How To Play

  • Select Your Symbol (X or O)

  • Players take turns entering positions [1–9] on the board

  • Player 1 always starts first

  • The game ends when :

    • player gets 3 in a row (row, column, or diagonal), OR
    • The board is full (draw)

🪪 LICENSE

This project is licensed under MIT License.

About

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).

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.