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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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