Cody

Problem 44363. Is this is a Tic Tac Toe X Win?

For the game of Tic Tac Toe we will be storing the state of the game in a matrix M.

For this game:

We would store the state as this:

-1  1  1 
 1 -1 -1
 1 -1 -1

If there were any blanks squares, they would be 0;

For this challenge, given a game state, does X (1) have a three in a row on any row, column or major diagonal?

Solution Stats

38.35% Correct | 61.65% Incorrect
Last solution submitted on Dec 11, 2017

Problem Comments

Win prizes and improve your MATLAB skills

Play today