Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
b = [0 1 1 0 2;
0 1 2 2 1;
1 0 2 2 2;
1 1 2 2 1;
1 1 2 1 0];
result_correct = 2;
assert(isequal(c4winner(b),result_correct))
|
2 | Pass |
%%
b = [0 0 0 0;
1 0 2 0;
1 1 1 1;
0 0 2 2];
result_correct = 1;
assert(isequal(c4winner(b),result_correct))
|
3 | Pass |
%%
b = [0 0 0 0 0 1;
2 2 0 0 2 2;
0 0 0 0 0 1;
2 0 0 1 1 0;
0 0 0 1 0 0;
0 0 1 0 2 2];
result_correct = 1;
assert(isequal(c4winner(b),result_correct))
|
4 | Pass |
%%
b = [0 0 0 0;
1 0 0 0;
0 0 0 0;
0 0 0 2];
result_correct = 0;
assert(isequal(c4winner(b),result_correct))
|
5 | Pass |
%%
b = [0 0 0 0;
1 1 1 1;
0 0 0 0;
0 0 0 2];
result_correct = 1;
assert(isequal(c4winner(b),result_correct))
|
6 | Pass |
%%
b = [0 0 2 2;
1 0 2 0;
1 2 2 1;
2 0 1 2];
result_correct = 2;
assert(isequal(c4winner(b),result_correct))
|
7 | Pass |
%%
b = [0 0 0 0;
1 0 1 1;
0 0 2 0;
0 2 0 2];
result_correct = 0;
assert(isequal(c4winner(b),result_correct))
|
12383 Solvers
284 Solvers
Getting the row and column location from a matrix
236 Solvers
Create a vector whose elements depend on the previous element
391 Solvers
227 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!