Write an interactive program that plays tic-tac-toe

Assignment Help Computer Engineering
Reference no: EM131857377

Problem

Write an interactive program that plays tic-tac-toe. Represent the board as a three-by-three character array. Initialize the array to blanks and ask each player in turn to input a position. The first player's position will be marked on the board with an O, and the second player's position will be marked with an X. Continue the process until a player wins or the game is a draw. To win, a player must have three marks in a row, in a column, or on a diagonal. A draw occurs when the board is full and no one has won. Input each player's position in the form of an index into the tic-tac-toe board; that is, a row number, space, and column number. Make the program user friendly. After each game, print out a diagram of the board showing the ending positions. Keep a count of the number of games each player has won and the number of draws. Before the beginning of each game, ask each player whether he or she wishes to continue. If either player wishes to quit, print out the statistics and stop.

Reference no: EM131857377

Questions Cloud

Healthcare center in a major american city : You have just opened a healthcare center in a major American city. You have a handful of employees and your main business is to provide
Which is more effective in motivation of salespeople : "It depends!" That's the most common response to the question, "which is more effective in motivation of salespeople, money or recognition?
Define the term progressive disciplinary plan : Managers share responsibility for employee performance and have an active role to play in the performance management cycle.
What are some of the public services : What are some of the public services you find in the open API directory, and how could they be used in data analytics?
Write an interactive program that plays tic-tac-toe : Write an interactive program that plays tic-tac-toe. Represent the board as a three-by-three character array.
Cyberspace or cybersecurity related risks : Develop a list of 5 or more specific cyberspace or cybersecurity related risks which the company included in its report investors.
How would you use inductive reasoning in decision-making : As a manager, when and how would you use inductive and deductive reasoning in decision-making?
Causing the death of someone else : What would be an example of a situation where a person could be sentenced to death for their involvement in causing the death of someone else?
Determine whether or not any two consecutive lines typed : Design and implement an Ada program to determine whether or not any two consecutive lines typed at the keyboard are anagrams of one another.

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