public class Game {
	private int score = 0;
	private int rolls[] = new int[21];
	private int currentRoll = 0;
	
	public void roll(int pins) {
		score += pins;
		rolls[currentRoll++]=pins;
	}

	public int score() {
		int score = 0;
		for(int i=0;i<rolls.length;i++){
			score += rolls[i];
		}
		return score;
	}
}
@@ -17,32 +17,8 @@
 e %7B%0A
-%09private int score = 0;%0A
 %09pri
@@ -49,16 +49,16 @@
 nt%5B21%5D;%0A
+
 %09private
@@ -115,25 +115,8 @@
 ) %7B%0A
-%09%09score += pins;%0A
 %09%09ro
@@ -189,36 +189,51 @@
 ;%0A%09%09
-for(int i=0;i%3Crolls.length;i
+int i = 0;%0A%09%09for(int frame=0;frame%3C10;frame
 ++)%7B
@@ -253,16 +253,38 @@
 rolls%5Bi%5D
+ + rolls%5Bi+1%5D;%0A%09%09%09i+=2
 ;%0A%09%09%7D%0A%09%09

refactor bowling kata