Cody

Solution 1701938

Submitted on 3 Jan 2019 by Mu
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
board = [ ' cat '; ' i p '; ' t poet'; ' c l '; 'there '; ]; score = 28; assert(isequal(scrabble_scores_6(board),score))

2   Pass
board = [ 'stratagems'; ' h a '; 'hello t '; ' r l '; 'fellow a '; ' a b '; ' users '; ]; score = 51; assert(isequal(scrabble_scores_6(board),score))

3   Pass
board = [ ' what y '; ' h do '; ' this um'; ' l n a'; ' of keen t'; ' o e l'; ' problem a'; ' noob'; ]; score = 72; assert(isequal(scrabble_scores_6(board),score))

4   Pass
board = [ ' if you '; ' i u '; ' like '; ' met g '; ' e it l'; ' e v i'; ' please k'; ' node'; ]; score = 56; assert(isequal(scrabble_scores_6(board),score))

5   Pass
board = [ 'c flummoxes zither'; 'al o e e e'; 'ba hunting eerie b'; 'ab a g e o e'; 'lo n m g l'; ' r g responses '; 'random n u u '; ' t v c below p r '; 'convention r e f '; ' r r n a areas'; ' y v c t i c '; ' o philosophy o em'; 'travel n n r r e'; ' e c t e'; ' word i a writer'; ' t n c o l'; 'p fortnight rock y'; 'i n h '; 'novelty m concatenate'; 'c e o a a s g'; 'heterogeneousness g'; ]; score = 364; assert(isequal(scrabble_scores_6(board),score))

6   Pass
ind = randi(4); switch ind case 1 board = [ ' cat '; ' i p '; ' t poet'; ' c l '; 'there ']; score = 28; case 2 board = [ 'stratagems'; ' h a '; 'hello t '; ' r l '; 'fellow a '; ' a b '; ' users ']; score = 51; case 3 board = [ ' what y '; ' e h do '; ' this um'; ' of n a'; ' keen t'; ' e l'; ' problem a'; ' noob']; score = 71; case 4 board = [ ' if you '; ' i u '; ' like '; ' met g '; ' it l'; ' v i'; ' please k'; ' node']; score = 54; end assert(isequal(scrabble_scores_6(board),score))

7   Pass
ind = randi(4); switch ind case 1 board = [ ' cat '; ' i p '; ' t poet'; ' c l '; 'there ']; score = 28; case 2 board = [ 'stratagems'; ' h a '; 'hello t '; ' r l '; 'fellow a '; ' a b '; ' users ']; score = 51; case 3 board = [ ' what y '; ' e h do '; ' this um'; ' of n a'; ' keen t'; ' e l'; ' problem a'; ' noob']; score = 71; case 4 board = [ ' if you '; ' i u '; ' like '; ' met g '; ' it l'; ' v i'; ' please k'; ' node']; score = 54; end assert(isequal(scrabble_scores_6(board),score))

8   Pass
ind = randi(4); switch ind case 1 board = [ ' cat '; ' i p '; ' t poet'; ' c l '; 'there ']; score = 28; case 2 board = [ 'stratagems'; ' h a '; 'hello t '; ' r l '; 'fellow a '; ' a b '; ' users ']; score = 51; case 3 board = [ ' what y '; ' e h do '; ' this um'; ' of n a'; ' keen t'; ' e l'; ' problem a'; ' noob']; score = 71; case 4 board = [ ' if you '; ' i u '; ' like '; ' met g '; ' it l'; ' v i'; ' please k'; ' node']; score = 54; end assert(isequal(scrabble_scores_6(board),score))