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_2

Step: 3

blur-text-image_3

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions