Cody

Solution 589254

Submitted on 28 Feb 2015 by Dan Brackmann
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
a = [ 1 0 1 0 -1 0 -1 -1 1]; b = [4 8]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

x = 2 4 8 wins = 8 wins = 8 4 wins = 8 4 0

2   Pass
%% a = [ 1 0 0 0 -1 0 -1 0 1]; b = [0]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

x = 2 4 6 7 8 wins = 0 wins = 0 0 wins = 0 0 0 wins = 0 0 0 0 wins = 0 0 0 0 0

3   Pass
%% a = [ 1 0 0 0 1 -1 1 -1 -1]; b = [2 7]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

x = 2 4 7 wins = 7 wins = 7 0 wins = 7 0 2

4   Pass
%% a = [ 1 0 0 -1 1 -1 1 -1 0]; b = [7 9]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

x = 4 7 9 wins = 9 wins = 9 7 wins = 9 7 0