|
|
@@ -25,7 +25,7 @@ class BowlingGame {
|
|
25
|
25
|
}
|
|
26
|
26
|
|
|
27
|
27
|
int strikeBonus = strikeBonus(frameIndex);
|
|
28
|
|
- if (strikeBonus > MAXIMUM_FRAME_SCORE && !isStrike(frameIndex + 1)) {
|
|
|
28
|
+ if (strikeBonus > MAXIMUM_FRAME_SCORE && !isStrike(frameIndex + 1) && spareBonus(frameIndex) > 10) {
|
|
29
|
29
|
throw new IllegalStateException("Pin count exceeds pins on the lane");
|
|
30
|
30
|
}
|
|
31
|
31
|
|