Cody

# Problem 2538. Find the Next Legal Move in Reversi

Solution 1752955

Submitted on 17 Mar 2019
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
board = [ 0 0 0 0 0 1 2 0 0 2 1 0 0 0 0 0 ]; side = 1; moves = [3 8 9 14]; assert(isequal(reversi_moves(board,side),moves))

Error: File: reversi_moves.m Line: 3 Column: 5 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses. Error in Test1 (line 7) assert(isequal(reversi_moves(board,side),moves))

2   Fail
board = [ 1 2 2 1 ]; side = 1; moves = []; assert(isequal(reversi_moves(board,side),moves))

Error: File: reversi_moves.m Line: 3 Column: 5 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses. Error in Test2 (line 5) assert(isequal(reversi_moves(board,side),moves))

3   Fail
board = [ 0 0 0 0 0 1 1 1 0 2 1 0 0 0 0 0 ]; side = 2; moves = [5 13 15]; assert(isequal(reversi_moves(board,side),moves))

Error: File: reversi_moves.m Line: 3 Column: 5 Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses. Error in Test3 (line 7) assert(isequal(reversi_moves(board,side),moves))