Question: function [ result ] = checkTicTacToe ( ticTacMatrix ) where the data in ticTacMatrix means the following: - 9 9 empty square - 0 =

function [result]= checkTicTacToe( ticTacMatrix )
where the data in ticTacMatrix means the following:
-99 empty square
-0= o or "oh"
-\(1=x \)
Result should also be similar:
--99 error
-99 no winner
-0="oh" wins
-1="x" wins
your script should:
- error if:
- the input matrix is not \(3\times 3\)
- the input matrix contains invalid values
- use for loops, conditionals, and / or matrix math to check for win.
function [ result ] = checkTicTacToe (

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!