Cody

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

Created by Doug Hull in Cody5:Easy

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

37.74% Correct | 62.26% Incorrect
Last solution submitted on Nov 13, 2018

Problem Comments

Solution Comments

Recent Solvers300

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!