Skip to content

Tic-Tac-Toe in Java A simple Tic-Tac-Toe game in Java for two players. Players take turns entering row and column positions to place X or O on a 3x3 board. The game checks for a winner after each move. Basic input validation ensures fair play. How to Run: Compile: javac xo.java Run: java xo Future improvement

Notifications You must be signed in to change notification settings

kamesh07032005/Java-Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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! 🚀

About

Tic-Tac-Toe in Java A simple Tic-Tac-Toe game in Java for two players. Players take turns entering row and column positions to place X or O on a 3x3 board. The game checks for a winner after each move. Basic input validation ensures fair play. How to Run: Compile: javac xo.java Run: java xo Future improvement

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages