Skip to content

Commit 7e9fe73

Browse files
committed
cat score wrong index start
1 parent ed96c54 commit 7e9fe73

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/src/results.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,18 @@ class Results {
5858
_positions.removeLast();
5959
}
6060

61-
int _partialCATScoreCalculator(){
61+
int _partialCATScoreCalculator() {
6262
int score = 0;
63-
for(int i = 1; i < _commands.length; i++){
63+
for (int i = 0; i < _commands.length; i++) {
6464
int lineScore = 0;
6565
final List<String> tokenized = splitCommand(_commands[i]);
6666
switch (tokenized.first) {
6767
case "paint":
68-
lineScore = tokenized.length == 2 ? 0 : splitByCurly(tokenized[1]).length == 1 ? 1 : 2;
68+
lineScore = tokenized.length == 2
69+
? 0
70+
: splitByCurly(tokenized[1]).length == 1
71+
? 1
72+
: 2;
6973
break;
7074
case "fill_empty":
7175
lineScore = 1;

0 commit comments

Comments
 (0)