GREEN: save score state and add knocked pins on each roll

This commit is contained in:
fiatcode 2026-02-10 11:24:12 +07:00
parent e4167c03a5
commit b4cdd039ae

View file

@ -1,7 +1,11 @@
class BowlingGame {
void roll(int pins) {}
int _score = 0;
void roll(int pins) {
_score += pins;
}
int score() {
return 0;
return _score;
}
}