Skip to content

About

Created a Tic-tac-toe game using Java as language with the concepts of OOP in Java

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game 🎮 | Java Console-Based

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.

🚀 Features

  • 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

🛠️ Technologies Used

  • Language: Java
  • IDE: You can use any Java IDE like IntelliJ IDEA, Eclipse, or simply a terminal with javac and java commands.

📁 Project Structure

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

About

Created a Tic-tac-toe game using Java as language with the concepts of OOP in Java

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages