From 9ca4accd7b6ab70a80d1f4ba0516f62d93e0cf05 Mon Sep 17 00:00:00 2001 From: fiatcode Date: Tue, 10 Feb 2026 12:33:22 +0700 Subject: [PATCH] RED: test one strike --- test/bowling_game_test.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/bowling_game_test.dart b/test/bowling_game_test.dart index c278f51..14fafe0 100644 --- a/test/bowling_game_test.dart +++ b/test/bowling_game_test.dart @@ -33,5 +33,14 @@ void main() { expect(game.score(), 16); // 10 (spare) + 3 (bonus) + 3 (normal roll) }); + + test('one strike', () { + game.roll(10); // Strike! + game.roll(3); + game.roll(4); // Next 2 rolls are bonus + rollMany(16, 0); + + expect(game.score(), 24); // 10 + 3 + 4 (strike) + 3 + 4 (frame 2) = 24 + }); }); }