Implement a Tic Tac Toe game that uses three threads

Assignment Help Programming Languages
Reference no: EM132265183

Problem -

Goal - Implement a Tic Tac Toe game that uses three threads.

Requirements: Create a program that has a main thread and two sub threads. All threads share a data structure that contains the state of the Tic Tac Toe board. One sub-thread represents the X's, the other they Y's.

Write a simulation where the main thread determines if the game is won, tied, or which sub-thread can move. The main thread will notify a sub-thread if it can make a move.

A sub-thread makes a move by selecting a position on the playing board. This can be done by asking the user for input, or by creating an AI that will select moves for each player.

Once the game is won, each thread should stop executing, then the main program should exit.

The output of the program should clearly state when each thread is created, destroyed, or when it is active/deactivates (i.e. main thread is calculating if the game is won).

Additionally, information about the game should be present. I.e. starting the game, prompting the user for input (if applicable), and the conclusion of the game.

Reference no: EM132265183

Questions Cloud

Identify sustainable supply chain : Identify Sustainable Supply Chain? Support your work with some referencing and citations
Should states interfere by passing laws in this regard : Discuss the current conflict between women's ability to fill their prescriptions for birth control and emergency contraception and an individual pharmacist's.
Corporate stakeholders are under pressure from investors : Corporate stakeholders are under pressure from investors, shareholders, customers and nonprofits to ensure sustainability is evident
What are the components of a budget proposal : What are the components of a budget proposal? We had to make a detailed budget for a hypothetical company we are starting and use that to make a detailed budget
Implement a Tic Tac Toe game that uses three threads : Goal - Implement a Tic Tac Toe game that uses three threads. Create a program that has a main thread and two sub threads
Briefly describe the essential elements of your topic : (Our menu will be Art and Literature Analysis in which we will be each choosing a movie that has female leads. Then testing to see if the movies we watch.
Approaches to defining an organization competitors : Which one of these approaches do you think is the most useful and why? Why are these important?
Describe the management dilemma : Describe the management dilemma. Describe and clarify the management dilemma.
Design a strategy for dealing with workers : They just ignore you and complain to other workers about reporting to someone your age. Design a strategy for dealing with these workers and your manager.

Reviews

len2265183

3/24/2019 10:54:17 PM

Submission Requirements - Include a Make file that will create a programs named TTT. automated grading setup for this project and unless you follow these requirements, Grading Rubric - Threads created properly, Synchronization used properly, Program exits properly. Program works as expected.

Write a Review

Programming Languages Questions & Answers

  Write if statement to display acceptance messag

Write an if statement that displays an acceptance message for an astronaut candidate if the person's weight is between the values of opt_min.

  Explain why the insert statement for the view

Explain why the insert statement for the view you created in #2 did not work.

  Unix or linux versus microsoft windows server

Programmability - address the benefits and disadvantages of using UNIX or Linux versus Microsoft Windows Server within the organization, then propose one of the products.

  Create a new console application project

Create a new console application project and name it "Week1Lab_BirdN". Create the necessary member functions that will perform the required operations outlined in the lab summary above.

  Generate code for the given three address statements

Generate code for the following three-address statements assuming stack allocation where register SP points to the top of the stack.

  Write a program for a local charity

IT 102 Final Project - Golf-a-thon. Problem: You have been asked to write a program for a local charity that has an annual golf-a-thon to raise money

  Draw the class diagram for your modi ed system

Explain what is wrong. Modify the system so that it conforms to the pattern. Explain each of the changes you made to the system. Draw the class diagram for your modi ed system.

  Program to read employee information into array of objects

Consider a program that will read employee information into an array of objects, sort the array by employee identification number, write out the sorted array.

  Calculate the average rainfall for three months

Write a program that asks the user to enter five floating-point numbers. The program should create a file and save all five numbers to the file.

  Write a program to use function

The program ends the first time that the user chooses not to delete a value from the array. Your main function may also call other functions to carry out some of its work - Here is an example execution of the required program (input typed by the us..

  Writing application to accept loan amount-interest rate

Write down the application to accept a loan amount, annual interest rate, and loan period (in number of years) and displays a table with five columns.

  Find out a web site which describes the use of a selection

find a web site that explains the use of a selection structure or an iteration structure in programming. provide the

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