public void ScoreWithSpare() { var game = new Game(); for (int i = 0; i < 10; i++) { game.Roll(2); } game.Roll(1); game.Roll(9); for (int i = 12; i < 20; i++) { game.Roll(2); } Assert.AreEqual(48, game.Score()); }
public void ScoreWithoutStrickesAndSpares() { var game = new Game(); for (int i = 0; i < 20; i++) { game.Roll(4); } Assert.AreEqual(80, game.Score()); }
public void NoScore() { var game = new Game(); for (int i = 0; i < 20; i++) { game.Roll(0); } Assert.AreEqual(0, game.Score()); }
public void ScoreWithMultipleNotConsecutiveSpares() { var game = new Game(); game.Roll(1); game.Roll(9); for (int i = 2; i < 10; i++) { game.Roll(2); } game.Roll(1); game.Roll(9); for (int i = 12; i < 20; i++) { game.Roll(2); } Assert.AreEqual(56, game.Score()); }
public void ScoreWithStrike() { var game = new Game(); for (int i = 0; i < 10; i++) { game.Roll(2); } game.Roll(10); for (int i = 11; i < 19; i++) { game.Roll(2); } Assert.AreEqual(50, game.Score()); }
public void ScoreWithTwoConsecutiveStrikes() { var game = new Game(); for (int i = 0; i < 10; i++) { game.Roll(2); } game.Roll(10); game.Roll(10); for (int i = 12; i < 18; i++) { game.Roll(2); } Assert.AreEqual(66, game.Score()); }