Cody

Solution 528194

Submitted on 13 Nov 2014 by rifat
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)))

[Warning: This concatenation operation includes an empty array with an incorrect number of rows. Concatenation including empty arrays will require all arrays to have the same number of rows in a future release.] [> In boardResult at 29 In verifyCode>evaluateCode at 238 In verifyCode at 43 In fevalJSON at 14]

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