TimoleonLatinopoulos пре 8 година
родитељ
комит
36e41a87be
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      exercises/bowling/.meta/src/reference/java/BowlingGame.java

+ 1
- 1
exercises/bowling/.meta/src/reference/java/BowlingGame.java Прегледај датотеку

25
                 }
25
                 }
26
 
26
 
27
                 int strikeBonus = strikeBonus(frameIndex);
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
                     throw new IllegalStateException("Pin count exceeds pins on the lane");
29
                     throw new IllegalStateException("Pin count exceeds pins on the lane");
30
                 }
30
                 }
31
 
31