Problem

a. In Chapter 9, you created a Tic Tac Toe game in which you used a 2D array of characte...

a. In Chapter 9, you created a Tic Tac Toe game in which you used a 2D array of characters to hold Xs and Os for a player and the computer. Now create a JFrame that uses an array of nine JButtons to represent the Tic Tac Toe grid. When the user clicks a JButton that has not already been taken, place an X on the button and then allow the computer to place an O on a different button. Announce the winner when either the computer or the player achieves three marks in sequence, or announce that the game was a tie. Figure 16-41 shows a typical game in progress and after the player has won. Save the game as JTicTacToe.java.

b. Add a graphic that displays a large letter representing the winning player of the game in Game Zone exercise 1a. Draw a large X, O, or, in case of a tie, an overlapping X and O in different colors. Save the game as JTicTacToe2.java.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT