Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS212: Project 2 (ON GUIs) This project has 3 parts. However, part 3 is optional . Part1: (1) Divide the content pane into two. (2)

CS212: Project 2 (ON GUIs) This project has 3 parts. However, part 3 is optional

. Part1: (1) Divide the content pane into two. (2) In the first pane, create a 3x3 grid for Tic Tac Toe using JButton. (3) You should to be able to play the game with a second human player by just clicking the buttons. (4) Increase the font size to fill each square of the grid with either a X or an O. (5) The second pane is for setting the ReStart Button and the text area. (6) Additionally create a 3x3 two dimensional array called play, and store moves in it as the game is progressing. (7) Using this array, declare a winner or a draw. (8) Imagine what should happen before a game begins or play a game against yourself to understand what all you have to do before one plays the game. (9) After that plan what classes you need. (10) design your game and show to your lab instructors. When they approve the plan, go ahead and code it.

Part2: Modify the game so that a human player plays the game with a computer that uses random moves

Part3: (optional extra credit) Modify the game so that a human player plays the game with a computer that makes smart moves. What does it mean for a computer to make a smart move? The computer looks at the game position, then for each possible move, the computer analyzes all possible outcomes before it chooses the best move.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions