Cody

Solution 551999

Submitted on 4 Jan 2015 by Paul Berglund
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