Scenario: No score after one roll
  Given a strike is bowled
  When scores are tallied
  Then there should be no score at frame 1

Scenario: No score after spare
  Given a 8 count is bowled and spare is made
  When scores are tallied
  Then there should be no score at frame 1

Scenario: Score after spare and first roll
  Given a 9 count is bowled and spare is made
  And an 9 count is bowled
  When scores are tallied
  Then the score at frame 1 should be 19
  And 19 the score at frame 1 should be 

Scenario: Start with an open
  Given an 8 count is bowled and only 1 is picked
  When scores are tallied
  Then the score at frame 1 should be 9

Scenario: Three Strikes
  Given a strike is bowled
  And a strike is bowled
  And a strike is bowled
  When scores are tallied
  Then the score at frame 1 should be 30

Scenario: Strike and Spare
  Given a strike is bowled
  And an 8 count is bowled and spare is made
  When scores are tallied
  Then the score at frame 1 should be 20

Scenario: Start with an open again
  Given an 8 count is bowled and none are picked
  When scores are tallied
  Then the score at frame 1 should be 8

Scenario: Invalid single roll
  Given an 11 count is bowled
  When scores are tallied
  Then invalid pin count should be detected

Scenario: Invalid spare roll
  Given an 9 count is bowled and only 2 are picked
  When scores are tallied
  Then invalid pin count should be detected

Scenario: Invalid single roll
  Given an -1 count is bowled
  When scores are tallied
  Then invalid pin count should be detected

Scenario: Invalid roll
  Given an 5 count is bowled and only -1 is picked
  When scores are tallied
  Then invalid pin count should be detected

Scenario: Invalid rolls
  Given a strike is bowled
  And an -1 count is bowled
  When scores are tallied
  Then invalid pin count should be detected

Scenario: Invalid rolls
  Given a strike is bowled
  And a strike is bowled
  And an -1 count is bowled
  When scores are tallied
  Then invalid pin count should be detected

Scenario: 300 Game
  Given rolls look like XXXXXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 300
  And 270 the score at frame 9 should be

Scenario: 299 Game
  Given rolls look like XXXXXXXXXXX9
  When scores are tallied
  Then the score at frame 10 should be 299

Scenario: 290 Game
  Given rolls look like 9/XXXXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 290

Scenario: 289 Game
  Given rolls look like XXXXXXXXXX9/
  When scores are tallied
  Then the score at frame 10 should be 289

Scenario: 288 Game
  Given rolls look like XXXXXXXXXX9-
  When scores are tallied
  Then the score at frame 10 should be 288

Scenario: 280 Game
  Given rolls look like X9/XXXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 280

Scenario: 279 Game
  Given rolls look like XX9/XXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 279

Scenario: 279 Game
  Given rolls look like 9-XXXXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 279

Scenario: 267 Game
  Given rolls look like XX9-XXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 267

Scenario: Dutch 200
  Given rolls look like X9/X9/X9/X9/X9/X9/
  When scores are tallied
  Then the score at frame 10 should be 200

Scenario: All spares
  Given rolls look like 9/9/9/9/9/9/9/9/9/9/9/9/
  When scores are tallied
  Then the score at frame 10 should be 190

Scenario: All misses
  Given rolls look like 9-9-9-9-9-9-9-9-9-9-
  When scores are tallied
  Then the score at frame 10 should be 90

Scenario: Time for the bumpers
  Given rolls look like --------------------
  When scores are tallied
  Then the score at frame 10 should be 0

Scenario: Too many rolls should be ignored
  Given rolls look like XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  When scores are tallied
  Then the score at frame 10 should be 300

Scenario: Table
  Given rolls are <rolls>
  When scores are tallied
  Then scores should be <scores>

Examples:
|rolls                 |scores
|9-                    |  9
|9/9                   | 19
|X X 9                 | 29
|X X X                 | 30
|X X X 8               | 30  58
|X X X 81              | 30  58  77 86
|X X X X X X X X X XXX | 30  60  90 120 150 180 210 240 270 300 
|X X X X X X X X X XX9 | 30  60  90 120 150 180 210 240 270 299
|X X X X X X X X X XX- | 30  60  90 120 150 180 210 240 270 290
|9/X X X X X X X X XXX | 20  50  80 110 140 170 200 230 260 290
|X X X X X X X X X X9/ | 30  60  90 120 150 180 210 240 269 289
|X X X X X X X X X X9- | 30  60  90 120 150 180 210 240 269 288
|X X X X X X X X X X81 | 30  60  90 120 150 180 210 240 268 287
|X -/X X X X X X X XXX | 20  40  70 100 130 160 190 220 250 280
|X --X X X X X X X XXX | 10  10  40  70 100 130 160 190 220 250
|X 9/X 9/X 9/X 9/X 9/X | 20  40  60  80 100 120 140 160 180 200
|--------------------  |  0   0   0   0   0   0   0   0   0   0