From b4cdd039ae7c08a1e7687d5432fdd8880993a3a4 Mon Sep 17 00:00:00 2001 From: fiatcode Date: Tue, 10 Feb 2026 11:24:12 +0700 Subject: [PATCH] GREEN: save score state and add knocked pins on each roll --- lib/bowling_game.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/bowling_game.dart b/lib/bowling_game.dart index a900cb8..b4983c5 100644 --- a/lib/bowling_game.dart +++ b/lib/bowling_game.dart @@ -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; } }