Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 626 Bytes

File metadata and controls

23 lines (17 loc) · 626 Bytes

Tic-Tac-Toe in Java

A simple Tic-Tac-Toe game implemented in Java. This game allows two players to take turns marking spaces on a 3x3 grid until one player wins.

Features

  • Turn-based gameplay: Players enter row and column numbers to place X or O.
  • Win detection: Checks for row, column, or diagonal matches.
  • Basic input validation: Ensures players cannot overwrite an occupied cell.

How to Run

  1. Compile the Java file:
    javac xo.java
  2. Run the program:
    java xo
  3. Follow the prompts to play the game.

Enjoy playing Tic-Tac-Toe! 🚀