Cody

# Problem 45354. Connect Four - 01

Solution 2150238

Submitted on 4 Mar 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x =[2 2 1 1 2 1 2; 1 2 2 1 1 1 1; 1 2 1 1 2 2 2; 2 1 2 2 2 1 1; 1 1 2 1 2 1 1; 2 1 1 2 2 2 1]; assert(isequal(connect_four(x),1))

score1 = 2 score2 = 1

Output argument "win" (and maybe others) not assigned during call to "connect_four". Error in Test1 (line 7) assert(isequal(connect_four(x),1))

2   Fail
x =[ 2 2 1 1 2 1 2 1 2 2 1 1 1 1 1 2 1 1 2 2 2 2 1 2 2 2 1 1 1 1 2 1 2 1 1 2 1 1 2 2 2 2]; assert(isequal(connect_four(x),0))

score1 = 2 score2 = 2

Output argument "win" (and maybe others) not assigned during call to "connect_four". Error in Test2 (line 7) assert(isequal(connect_four(x),0))

3   Fail
x = [2 2 1 1 2 1 2 1 2 2 1 1 1 1 1 2 1 1 1 2 2 2 1 2 2 2 1 1 1 1 2 1 2 1 2 2 1 1 2 2 2 2 1 1 2 1 2 1 2]; assert(isequal(connect_four(x),1))

score1 = 4 score2 = 3

Output argument "win" (and maybe others) not assigned during call to "connect_four". Error in Test3 (line 8) assert(isequal(connect_four(x),1))

4   Fail
x =[2 2 1 1 2 1 2 1 1 2 2 1 1 1 1 2 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 1]; assert(isequal(connect_four(x),2))

score1 = 4 score2 = 5

Output argument "win" (and maybe others) not assigned during call to "connect_four". Error in Test4 (line 8) assert(isequal(connect_four(x),2))

5   Fail
x = [2 2 1 1 2 1 2 1 1 2 2 1 1 1 1 2 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 1 1 2 1 1 1 1 2 1]; assert(isequal(connect_four(x),0))

score1 = 7 score2 = 7

Output argument "win" (and maybe others) not assigned during call to "connect_four". Error in Test5 (line 9) assert(isequal(connect_four(x),0))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!