|
15 | 15 | ],
|
16 | 16 | "score": {
|
17 | 17 | "description": [
|
18 |
| - "Returns the final score of a bowling game" |
| 18 | + "returns the final score of a bowling game" |
19 | 19 | ],
|
20 | 20 | "cases": [{
|
21 | 21 | "description": "should be able to score a game with all zeros",
|
|
74 | 74 | "rolls": [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
|
75 | 75 | "expected": 300
|
76 | 76 | }, {
|
77 |
| - "description": "Rolls can not score negative points", |
| 77 | + "description": "rolls can not score negative points", |
78 | 78 | "rolls": [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
79 | 79 | "expected": -1
|
80 | 80 | }, {
|
81 |
| - "description": "A roll can not score more than 10 points", |
| 81 | + "description": "a roll can not score more than 10 points", |
82 | 82 | "rolls": [11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
83 | 83 | "expected": -1
|
84 | 84 | }, {
|
85 |
| - "description": "Two rolls in a frame can not score more than 10 points", |
| 85 | + "description": "two rolls in a frame can not score more than 10 points", |
86 | 86 | "rolls": [5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
87 | 87 | "expected": -1
|
88 | 88 | }, {
|
89 |
| - "description": "Two bonus rolls after a strike in the last frame can not score more than 10 points", |
| 89 | + "description": "two bonus rolls after a strike in the last frame can not score more than 10 points", |
90 | 90 | "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 6],
|
91 | 91 | "expected": -1
|
92 | 92 | }, {
|
93 |
| - "description": "An unstarted game can not be scored", |
| 93 | + "description": "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike", |
| 94 | + "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6], |
| 95 | + "expected": 26 |
| 96 | + }, { |
| 97 | + "description": "the second bonus rolls after a strike in the last frame can not be a strike if the first one is not a strike", |
| 98 | + "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6, 10], |
| 99 | + "expected": -1 |
| 100 | + }, { |
| 101 | + "description": "an unstarted game can not be scored", |
94 | 102 | "rolls": [],
|
95 | 103 | "expected": -1
|
96 | 104 | }, {
|
97 |
| - "description": "An incomplete game can not be scored", |
| 105 | + "description": "an incomplete game can not be scored", |
98 | 106 | "rolls": [0, 0],
|
99 | 107 | "expected": -1
|
100 | 108 | }, {
|
101 |
| - "description": "A game with more than ten frames can not be scored", |
| 109 | + "description": "a game with more than ten frames can not be scored", |
102 | 110 | "rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
103 | 111 | "expected": -1
|
104 | 112 | }, {
|
|
0 commit comments