107k views
2 votes
Write a program that allows two players to play the Tic-Tac-Toe game. One of the players can be the computer or human, the other must be human. Your program must contain the class ticTacToe to implement a ticTacToe object. Include a 3 by 3 two-dimensional array, as a private member variable, to create the board. If needed, include additional member variables

User Tien Hoang
by
4.3k points

1 Answer

4 votes

Answer:

Step-by-step explanation:

The following is a tictactoe game written in Java with all the necessary variables and methods needed for the game to function correctly. The game plays against the computer which randomly chooses a position to play every round. Due to technical difficulties the code was added as a txt file below and the output was added as a picture.

Write a program that allows two players to play the Tic-Tac-Toe game. One of the players-example-1
User Chirag Sorathiya
by
4.8k points