Question: Save the file as Project_TicTacToe_YourName.java. Also, you must capture screens of each interaction (dialog box) and save them in one file to submit. Create a

Save the file as Project_TicTacToe_YourName.java. Also, you must capture screens of each interaction (dialog box) and save them in one file to submit.

Create a Tic Tac Toe game. In this game, two players alternate placing Xs and Os into a grid until one player has three matching symbols in a row, horizontally, vertically, or diagonally. Create a game in which the user is presented with a three-by-three grid containing the digits 1 through 9. When the user chooses a position by typing a number, place an X in the appropriate sop. Generate a random number for the position where the computer will place an O. Do not allow the player or the computer to place a symbol where one has already been placed. When the computer has two Ox in any row, column, or diagonal, it selects the winning position for tis next move rather than selecting a position randomly. When either the player or computer has three symbols in a row, declare a winner; if all positions have been exhausted and no one has three symbols in a row, declare a tie.

============================== Message: Welcome to Tic Tac Toe. You will have X and the computer will have O. OK ============================================

Input: Enter the position where you want to play 1 2 3 4 5 6 7 8 9 >>> 7 OK Cancel =====================================

Message:

Your move is recorded; now the computer will play. 1 2 3 4 5 6 X 8 9 OK =======================================

Message: The computer has played 1 2 3 4 5 6 X O 9 OK

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!