public void Rolling_2_strikes_in_tenth_frame_gives_bonus_roll() { var game = new BowlingGame(); RollMany(game, 18, 0); game.Roll(10); game.Roll(10); game.Roll(10); Assert.That(game.Score(), Is.EqualTo(30)); }
public void Rolling_a_spare_in_tenth_frame_gives_bonus_roll() { var game = new BowlingGame(); RollMany(game, 18, 0); game.Roll(5); game.Roll(5); game.Roll(1); Assert.That(game.Score(), Is.EqualTo(11)); }
public void Rolling_a_strike_gives_next_2_rolls_in_next_frame_as_bonus() { var game = new BowlingGame(); game.Roll(10); game.Roll(3); game.Roll(1); RollMany(game, 16, 0); Assert.That(game.Score(), Is.EqualTo(18)); }
public void Rolling_a_spare_gives_next_roll_as_bonus() { var game = new BowlingGame(); game.Roll(5); game.Roll(5); game.Roll(1); game.Roll(1); RollMany(game, 16, 0); Assert.That(game.Score(), Is.EqualTo(13)); }
private static void RollMany(BowlingGame game, int times, int pinsHit) { for (var i = 0; i < times; i++) { game.Roll(pinsHit); } }