Cody

# Problem 650. Steal, Share, or Catch

Solution 2144810

Submitted on 29 Feb 2020
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
a = runPair(@StealShareCatch, @chaos); a(end+1) = runPair(@StealShareCatch, @good); a(end+1) = runPair(@StealShareCatch, @evil); a(end+1) = runPair(@StealShareCatch, @doug) yourScore = sum(a) terribleScore = 0; % works badScore = 23000; % good strategy scores this okScore = 26000; % evil strategy scores this decentScore = 29000; % chaos strategy scores this greatScore = 42000; % doug strategy scores this assert(yourScore > terribleScore, 'Score: %d', yourScore) assert(yourScore > badScore, 'Score: %d', yourScore) assert(yourScore > okScore, 'Score: %d', yourScore) assert(yourScore > decentScore, 'Score: %d', yourScore) assert(yourScore > greatScore, 'Score: %d', yourScore)

[Warning: MODE of a 0-by-0 matrix is NaN; result was an empty matrix in previous releases.] [> In mode (line 79) In StealShareCatch (line 12) In runPair (line 20) In ScoringEngineTestPoint1 (line 1) In solutionTest (line 5)] ans = NaN

Output argument "choice" (and maybe others) not assigned during call to "StealShareCatch". Error in Test1 (line 1) a = runPair(@StealShareCatch, @chaos);