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:
empty square
o or oh
x
Result should also be similar:
error
no winner
oh wins
x wins
your script should:
error if:
the input matrix is not times
the input matrix contains invalid values
use for loops, conditionals, and or matrix math to check for win.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
