Tic-Tac-Toe Game

This is a simple console-based Tic Tac Toe game implemented in Java. The game allows two players to play against each other on a 3x3 grid. Players take turns marking spaces with their respective symbols (X or O) to get three of their symbols in a row, column, or diagonal. How to Play

  1. Compile the Code: Use any Java compiler to compile the tic.java file
javac tic.java
  1. Run the Game: Run the compiled Java file to start the game
java tic

Game Rules:

  • Player 1 (X) and Player 2 (O) take turns to mark a space on the grid.
  • The game ends when one player gets three of their symbols in a row, column, or diagonal, or when all spaces are filled.
  • The game is declared a draw if all spaces are filled and no player has won.

Enjoy the Game: Have fun playing Tic Tac Toe!