Tic Tac Toe In Java Applet

Tic Tac Toe or Knots and Crosses

An early version of Tic-tac-toe was played in the Roman Empire, around the 1st century BC. It was called Terni Lapilli and instead of having any number of pieces, each player only had three, thus they had to move them around to empty spaces to keep playing. The game's grid markings have been found chalked all over Rome.

This game is for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game.

        java programming for tic tac toe using applet

          0  For computer          X : for User

Computer vs Human    First turn of human


Code:-


Main class

Other classes

Output:-
 javac main.java

 appletviewer main.java



Comments