File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
exercises/practice/bowling Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
- # This is an auto-generated file. Regular comments will be removed when this
2
- # file is regenerated. Regenerating will not touch any manually added keys,
3
- # so comments can be added in a "comment" key.
1
+ # This is an auto-generated file.
2
+ #
3
+ # Regenerating this file via `configlet sync` will:
4
+ # - Recreate every `description` key/value pair
5
+ # - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6
+ # - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7
+ # - Preserve any other key/value pair
8
+ #
9
+ # As user-added comments (using the # character) will be removed when this file
10
+ # is regenerated, comments can be added via a `comment` key.
4
11
5
12
[656ae006-25c2-438c-a549-f338e7ec7441 ]
6
13
description = " should be able to score a game with all zeros"
@@ -38,6 +45,9 @@ description = "rolling a spare with the two roll bonus does not get a bonus roll
38
45
[576faac1-7cff-4029-ad72-c16bcada79b5 ]
39
46
description = " strikes with the two roll bonus do not get bonus rolls"
40
47
48
+ [efb426ec-7e15-42e6-9b96-b4fca3ec2359 ]
49
+ description = " last two strikes followed by only last bonus with non strike points"
50
+
41
51
[72e24404-b6c6-46af-b188-875514c0377b ]
42
52
description = " a strike with the one roll bonus after a spare in the last frame does not get a bonus"
43
53
Original file line number Diff line number Diff line change @@ -94,6 +94,15 @@ describe('bowling', function()
94
94
assert .equal (18 , scorer .score ())
95
95
end )
96
96
97
+ it (' should correctly score last two strikes followed by only last bonus with points' , function ()
98
+ roll_n_times (0 , 16 )
99
+ scorer .roll (10 )
100
+ scorer .roll (10 )
101
+ scorer .roll (0 )
102
+ scorer .roll (1 )
103
+ assert .equal (31 , scorer .score ())
104
+ end )
105
+
97
106
it (' should not allow a bonus roll after rolling a spare after a strike on the last frame' , function ()
98
107
roll_n_times (0 , 18 )
99
108
scorer .roll (10 )
You can’t perform that action at this time.
0 commit comments