TimoleonLatinopoulos 8 лет назад
Родитель
Сommit
0faa02790c
1 измененных файлов: 4 добавлений и 4 удалений
  1. 4
    4
      exercises/bowling/.meta/src/reference/java/BowlingGame.java

+ 4
- 4
exercises/bowling/.meta/src/reference/java/BowlingGame.java Просмотреть файл

23
                 if (rolls.size() <= frameIndex + 2) {
23
                 if (rolls.size() <= frameIndex + 2) {
24
                     throw new IllegalStateException("Score cannot be taken until the end of the game");
24
                     throw new IllegalStateException("Score cannot be taken until the end of the game");
25
                 }
25
                 }
26
-                
26
+
27
                 int strikeBonus = strikeBonus(frameIndex);
27
                 int strikeBonus = strikeBonus(frameIndex);
28
                 if (strikeBonus > MAXIMUM_FRAME_SCORE && !isStrike(frameIndex + 1) || spareBonus(frameIndex) > 10) {
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
-                }       
31
-                
30
+                }
31
+
32
                 score += 10 + strikeBonus;
32
                 score += 10 + strikeBonus;
33
                 frameIndex += i == NUMBER_OF_FRAMES ? 3 : 1;
33
                 frameIndex += i == NUMBER_OF_FRAMES ? 3 : 1;
34
             } else if (isSpare(frameIndex)) {
34
             } else if (isSpare(frameIndex)) {
81
     private int frameScore(int frameIndex) {
81
     private int frameScore(int frameIndex) {
82
         return rolls.get(frameIndex) + rolls.get(frameIndex + 1);
82
         return rolls.get(frameIndex) + rolls.get(frameIndex + 1);
83
     }
83
     }
84
-}
84
+}