|
|
@@ -1,16 +1,16 @@
|
|
1
|
1
|
import java.util.ArrayList;
|
|
2
|
2
|
import java.util.List;
|
|
3
|
3
|
|
|
4
|
|
-public class BowlingGame {
|
|
|
4
|
+class BowlingGame {
|
|
5
|
5
|
private static final int NUMBER_OF_FRAMES = 10;
|
|
6
|
6
|
private static final int MAXIMUM_FRAME_SCORE = 10;
|
|
7
|
|
- private List<Integer> rolls = new ArrayList<Integer>();
|
|
|
7
|
+ private List<Integer> rolls = new ArrayList<>();
|
|
8
|
8
|
|
|
9
|
|
- public void roll(int pins) {
|
|
|
9
|
+ void roll(int pins) {
|
|
10
|
10
|
rolls.add(pins);
|
|
11
|
11
|
}
|
|
12
|
12
|
|
|
13
|
|
- public int score() {
|
|
|
13
|
+ int score() {
|
|
14
|
14
|
int score = 0;
|
|
15
|
15
|
int frameIndex = 0;
|
|
16
|
16
|
|