Create a graphical interface

Assignment Help Computer Engineering
Reference no: EM132078965

Need help with a well commented java program tic tac toe game using below guidelines.

This must be implemented using Swing to create a graphical interface, and using the Graphics class for drawing the board, the markers, and line through the winning set of markers.

The design of the GUI is up to you, provided you have the following:

•a way for the user to select who goes first;

•a way for the user to select their marker ("X" or "O");

•a START button to begin the game;

•a way to indicate whose move it is, whether someone has won, and any other information you deem appropriate;

•a tic-tac-toe board drawn within the window;

•a way to detect mouse clicks inside the game board, and respond to them by drawing the user's marker in the selected square;

•a computer response when it is the computer's move;

•a way to automatically detect (and indicate on the game board) when someone has won; and

•a button to start a new game after the game ends. Additionally, you should do all necessary sanity checking during the game.

For example:

•the user should not be able to take two moves in a row without the computer moving in-between;

•the user should not be able to continue playing after the game has ended;

•only marks in valid, empty squares are allowed; and so on.

Reference no: EM132078965

Questions Cloud

Calculate the mass of o : Under standard conditions (298 K and 1 atm. total pressure) Calculate the solubility (moles/liter) of O2 in water.
Hydrogen carbonate ion and hydrogen peroxide molecule : Write Lewis structures for the hydrogen carbonate ion and hydrogen peroxide molecule, with resonance forms where appropriate.
Calculate the equilibrium pressures of all species : If pure phosgene at an initial pressure of 1.0 atmosphere decomposes, calculate the equilibrium pressures of all species.
Determine the temperature of the gas in celsius : Using the ideal gas law, determine the Temperature of the gas in Celsius the volume is 20,440.0 liters and a pressure of 1 atmosphere
Create a graphical interface : Create a graphical interface, and using the Graphics class for drawing the board, the markers, and line through the winning set of markers.
Ksp for the dissociation : What is the solubility of CuBr in a 0.05 M HBr (strong) acid solution? The Ksp for the dissociation of CuBr(s) is 4.2 × 10-8.
Calculate the mole fraction of bromine in water : Calculate the mole fraction of bromine in water in both solutions.
Write a query that consists of one block only : Find the ssn and last name of every employee whose ssn contains two consecutive 8's, and has a supervisor. Sort the results by ssn.
What is the probability of a collision between packets : What is the probability of a collision between packets of the two piconets? Assume nodes are not using CSMA.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Determine the content of the mar

Determine the content of the MAR of a 16K, word-addressable memory for each of the following: Word 48, Word 341.

  Design circuits for half and full subtractors

Design circuits for half- and full subtractors. The half-subtractor has two inputs and two outputs (DIFFERENCE and BORROW). The full sub-tractor has three input

  Design and implement a robust windows network

You are bidding on a lucrative contract to design and implement a robust Windows network. Crete, Inc.has provided details of their current IT infrastructure.

  Briefly explain explanatory and predictive analytics

What is the purpose of the GROUPING SETS subclause and what is its primary use? What is data analytics? Briefly explain explanatory and predictive analytics.

  What are the basic features and transfer speeds of dsl

What are the basic features and transfer speeds of DSL? What are the basic features and transfer speeds of cable modems?

  Questionwrite down a script that finds the smallest of

questionwrite down a script that finds the smallest of several nonnegative integers. suppose that the first value read

  Describe categories of project success measures

List and describe the four different categories of project success measures. During which stage of a project are most risks typically uncovered?

  Explain when you would use a scsi drive

Discuss the questions and topics related to interface communications. Explain when you would use a SCSI drive. When you would have a need to use RAID? Explain.

  Design the program in vb.net

Write down the program in VB.Net (not Web based) using a loan amount of $200,000 with an interest rate of 5.75% and a 30 year term. Display the mortgage payment amount. Insert comments to document the program.

  Develop a menu-driven program that inputs two numbers

Develop a menu-driven program that inputs two numbers and at the user's option, finds their sum, difference, product or quotient.

  Write a recursive program to compute height of a binary tree

Write a recursive program to compute the height of a binary tree: the longest distance from the root to an external node.

  Discuss whether design considerations need to change

Discuss whether design considerations need to change for each kind of computer users. Support your answer with an example.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd