Looking for a simple java program that plays tic tac tow


Looking for a simple Java program that plays tic tac tow and using a 2D array and have A.I. Look at the attachment for the instructions.

1. Use a two dimensional array to represent the game board

2. Use a while loop and conditional logic to allow two players to take turns.

3. Allow the user to specify where they would like to move.

4. When the user enters the position of their move, you should display an updated game board showing their move (or throw an exception if they try to move to a location that isn't empty).

5. Display "Humans player wins", "Computer wins", or "It's a draw." when the game is over.

6. Maintain a record of each game in a file called games.txt. The results of each game should be appended to the file. It should be displayed to the user before every new k game, and be displayed in the format below:

Game 1: Human player wins

Game 2: Computer wins

Game 3: Computer wins

Note: You don't need to make the computer player behave intelligently. It's fine for the computer to choose any available position randomly.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Looking for a simple java program that plays tic tac tow
Reference No:- TGS02392096

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)