Write a program that allows two individuals to play

Assignment Help Computer Engineering
Reference no: EM13323013

Write a program that allows two individuals to play a single game of Tic-Tac-Toe.

Rules and Requirements:

  • You are to re-write Program 08, using a char array to represent the board instead of a string.
  • You must use a the following char Array to represent the nine squares of the board. Notice: board[0]will not be used.
    char [] board = new char[10];
    
  • You must re-write (and use) all of the methods indicated in Program 08, those given (by definition) as well as those prescribed (by heading), to take and use the array board (instead of the String board).
  • Your program may use additional methods where appropriate.
  • You must write a main method that allows a pair of users to play a game of Tic-Tac-Toe such that:

    Each turn of the game:

    • It must be clear whose turn it is X's or O's.
    • The current board configuration must be displayed in a reasonable format.
    • An available square number [1, 9] is obtained from a player and is used make their (valid) move on the board.
  • The game ends when there is a Tic-Tac-Toe (win) or all the positions of the board are full (stalemate). A simple report indicates which has occurred and in the case of a win, who has won X or O.

Reference no: EM13323013

Questions Cloud

Find the recoil velocity of the man relative to the ice : Starting from rest, two skaters "push off" against each other on smooth level ice, where friction is negligible. One is a woman and one is a man. find the recoil velocity of the man relative to the ice
Write an applet that draws the house shown : Write an applet that draws the house shown. When the user clicks on the STOP sign, audio of your choice should play.
Find the low point of curve of the intersection at station : The curve is 750-ft long,and the minus grade of 3.6 percent intersects the plus grade of 6.2percent at station 240 + 80.00. Calculate the low point of thecurve if the intersection at station 240 + 80.00 is at elevation426.84.
Explain the molar enthalpy of fusion for ice : Suppose that 33.55 g of ice at -12.9°C is placed in 54.72 g of water at 99.8°C in a perfectly insulated vessel. Calculate the final temperature. (The molar heat capacity for ice is 37.5 J K-1 mol-1 and that for liquid water is 75.3 J K-1 mol-1. Th..
Write a program that allows two individuals to play : Write a program that allows two individuals to play a single game of Tic-Tac-Toe.
What type of aquifer material do you expect in the location : The elevation of water in well A is 300m above sea level and well B is 350m above sea level. The wells are 45m apart. A dye test reveals that the specific discharge between the two wells is about 2.75m/day.
Organization with a well-known supply chain-overall strategy : Consider any organization with a well-known supply chain and overall strategy and will describe how the supply chain strategy supports the overall strategy of the firm and helps them achieve their overall objectives. In a 3 page paper discuss the str..
The oxygen content of a fuel to ensure complete combustion : The oxygen content of a fuel that is recommended in order to ensure complete combustion about 2.7%. (a) Consider a case where methyl tertiary butyl ether (MBTE) is to be added to the conventional gasoline.
Determine the volume of traffic across the bridge : A bridge has been constructed between the mainland and an island.The total cost (excluding tolls) to travel across the bridge isexpressed as C = 50 + 0.5V, where V is the number of veh/h and C isthe cost/vehicle in cents.

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