RED: test one spare
This commit is contained in:
parent
acf96ad482
commit
f34c820c65
1 changed files with 9 additions and 0 deletions
|
|
@ -24,5 +24,14 @@ void main() {
|
||||||
rollMany(20, 1);
|
rollMany(20, 1);
|
||||||
expect(game.score(), 20);
|
expect(game.score(), 20);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('one spare', () {
|
||||||
|
game.roll(5);
|
||||||
|
game.roll(5); // spare
|
||||||
|
game.roll(3); // bonus for spare
|
||||||
|
rollMany(17, 0); // rest are gutter balls
|
||||||
|
|
||||||
|
expect(game.score(), 16); // 10 (spare) + 3 (bonus) + 3 (normal roll)
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue