Cody

# Problem 2565. Determine the Result of a Move in Reversi

Solution 2811418

Submitted on 9 Aug 2020 by Sohom Sen
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   Pass
boardIn = ... [ 0 0 0 0 0 1 2 0 0 2 1 0 0 0 0 0 ]; side = 1; move = 14; boardOut = ... [ 0 0 0 0 0 1 1 1 0 2 1 0 0 0 0 0 ]; assert(isequal(boardOut,boardResult(boardIn,side,move)))

2   Pass
boardIn = ... [ 0 0 0 0 0 1 1 1 0 2 1 0 0 0 0 0 ]; side = 2; move = 5; boardOut = ... [ 0 2 0 0 0 2 1 1 0 2 1 0 0 0 0 0 ]; assert(isequal(boardOut,boardResult(boardIn,side,move)))

3   Pass
boardIn = ... [ 0 2 0 0 0 2 1 1 0 2 1 0 0 0 0 0 ]; side = 1; move = 4; boardOut = ... [ 0 2 0 0 0 2 1 1 0 1 1 0 1 0 0 0 ]; assert(isequal(boardOut,boardResult(boardIn,side,move)))

4   Pass
boardIn = ... [ 0 0 0 0 0 0 1 1 2 2 0 2 1 1 0 0 0 2 1 0 0 0 0 0 0 ]; side = 1; move = 9; boardOut = ... [ 0 0 0 0 0 0 1 1 2 2 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 ] assert(isequal(boardOut,boardResult(boardIn,side,move)))

boardOut = 0 0 0 0 0 0 1 1 2 2 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0