Skip to content

Mrutunjaya-Panda/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages