Structure plan in matlab

Assignment Help C/C++ Programming
Reference no: EM13908742

Tic-Tac-Toe (a.k.a. Noughts and crosses) is a game played by two players (‘X' and ‘O') on a 3x3 grid. In MATLAB, use a 3x3 cell array to hold the board information. Take it in turns to play the game, inserting ‘X's and ‘O's at various spots. Implement the following structure plan in MATLAB.

1) Commence the game, display empty board

2) Select which player is ‘X' and ‘O' (at random)

3) Request player1's move

4) Input Player1's move. Redraw updated board.

5) Decision: has the game been won yet? If so, go to step 9). If not, go to step 6).

6) Request player2's move

7) Input Player2's move. Redraw updated board.

8) Decision: has the game been won yet? If so, go to step 9). If not, go back to step 3).

9) Display winner on the screen.

Reference no: EM13908742

Questions Cloud

Develop a detailed capstone project proposal and plan : Develop a detailed Capstone Project Proposal and Plan using project management software (as listed in the Study Schedule) and the skills you have acquired from IT Project Management to develop a project plan with a Work Breakdown Structure (WBS), ..
Calculate the total amount of revenue : Calculate the total amount of revenue (gross profit) that will be lost if the engraver breaks and is down for 18 business days
Compute the net operating income for first year of operation : Using the given information, compute the net operating income (NOI) for the first year of operations. Include capital expenditures as an expense.
Compute the various measures of typicality : The ages (in years) of Academy Award (Oscar) winners for Best Actress and Best Actor are given. Compute the 1) various measures of typicality, 2) measures of spread
Structure plan in matlab : Tic-Tac-Toe (a.k.a. Noughts and crosses) is a game played by two players (‘X' and ‘O') on a 3x3 grid. In MATLAB, use a 3x3 cell array to hold the board information. Take it in turns to play the game, inserting ‘X's and ‘O's at various spots. Imple..
Display currency conversion for us dollar : Write a MATLAB script to display currency conversion for US Dollar, British Pound, Euro with Singapore Dollar as the base Currency. Your output should show the equivalent values for USD, GBP, EURO for every Singapore dollar in increments of 1 doll..
Implement distributed system facility : In this assignment you will implement a distributed system facility based on Client-Server programming -  The client and server processes will be on different machines. In this case, the server is a stateful server.
Predict the level of the ocean : Write a mathematical expression that would predict the level of the ocean at this beach at any time of the day. Find times in the day when the ocean level is exactly at sea level.
Is the prospect a positive npv using roe as the hurdle rate : Using tax cash flows and no debt (pure equity), is prospect a positive NPV using ROE as the hurdle rate? Using the after tax cash flows and the firm's WACC, is this project desirable? Explain how you came to this conclusion.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program to tell you how many months it will take to pay off

write a program to tell you how many months it will take to pay off any loan, as well as the total amount of interest paid over the life of the loan.

  Prepare the program to calculate the future investment value

Write a C++ program that reads in investment amount, annual interest rate, and number of years in this order, and displays the future investment value using the subsequent formula:

  Program to translates letter grade into number grade

In C++ (should be able to compile in Visual Studio 2010): Write a program to translates letter grade into number grade. Letter grades are A,B,C,D and F, possibly followed by a + or -.

  Consider an l1 cache with an access time of 1 ns

Suppose that we can change the cache design (size of cache, cache organization) such that we increase H to 0.97, but increase access time to 1.5 ns. What conditions must be met for this change to result in improved performance?

  Write a program that allows a user to enter 12 double values

Write a program that allows a user to enter 12 double values representing store sales for each month of one year. After all 12 values are entered,

  Write a program that will convert us dollar amounts

Write a program that will convert US dollar amounts to Canadian dollar (1 CND = 0.92 USD). Format your currency amounts in two decimal places and trailing zeros.

  Write a code for ludo game

Write a C++ code ludo game C++ is a statically typed, compiled, general-purpose, case -sensitive, free -form programming language that supports procedural, object -oriented, and generic programming.

  The use of one learning pattern to another

1. A person who can feel themselves shifting from the use of one Learning Pattern to another is a(n)        Dynamic learner.        Bridge learner.

  Write a function that computes length of a character string

Write a function that computes the length of a character string (i.e. write your own implementation of the strlen function.

  The process function will then need

The process function will then need to find the time the person waited by calling the time function and finding the difference between the start and end timestamps. Save this time to an accumulator so that in the end you can find the average wait tim..

  Inventory items stored in Sudbury

Give the details of all suppliers in the Sault Ste Marie, list all inventory items with a quantity less than 100 units and list all the inventory items stored in Sudbury

  A method to evaluate the polynomial

Your task is to design and develop a C++ class whose objects represent polynomials.A polynomial is shown as:anxn + an-1xn-1 + ... + a0To simplify things, you can safely assume that the power of x and the coefficients are all integers.

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