private void RollsMany(Game game, int rolls, int pins) { for (int index = 0; index < rolls; index++) { game.Roll(pins); } }
private void RollMany(Game game, int rolls, int pins) { for (int roll = 0; roll < rolls; roll++) { game.Roll(pins); } }
private void RollMany(int n, int pins) { for (int i = 0; i < n; i++) { g.Roll(pins: pins); } }
public void TestOneSpare() { RollSpare(); g.Roll(3); RollMany(17, 0); Assert.AreEqual(16, g.Score()); }
private void RollMany(int rollCount, int pins) { for (int i = 0; i < rollCount; i++) { g.Roll(pins); } }
private void RollMany(int numRolls, int pins) { for (int index = 0; index < numRolls; index++) { game.Roll(pins); } }
public void It_should_score_with_and_spare_in_the_last_roll() { var expectedScore = 62; CreateFrame(8, 2); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 0); CreateFrame(4, 6); game.Roll(6); var score = game.Score(); Assert.True(score == expectedScore); }
public void Return_0_when_no_pins_striked_down() { var game = new Game(); for (int i = 1; i <= 20; i++) { game.Roll(0); } Assert.AreEqual(0, game.Score()); }
private void RollFrame(int firstRoll, int secondRoll, int numberOfFrames) { for (int i = 0; i < numberOfFrames; i++) { g.Roll(firstRoll, secondRoll); } }
public void TestForAll0() { for (int i = 0; i < 20; i++) { game.Roll(0); } Assert.Equal(0, game.Score()); }
public void test_rollTwice() { game.Roll(2); game.Roll(3); Assert.AreEqual(5, game.Score()); }
public void TestSpare() { g.Roll(5); g.Roll(5); g.Roll(3); MultipleRolls(17, 0); Assert.AreEqual(16, g.Score()); }