public void AllOnes() { List <int> pins = new List <int> { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo((1 + 1) * 10)); }
public void AllZero() { List <int> pins = new List <int> { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; Assert.That(Game.GetScore(pins), Is.EqualTo(0)); }
public void Strikeandhalf() { List <int> pins = new List <int> { 10, 0, 0, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (10 + 10 + 10 + 1) + (1 + 1) * 8)); }
public void HalfOneStrike() { List <int> pins = new List <int> { 0, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 0, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (5 + 1 + 5) + (1 + 1) * 7 + 10 + 1 + 1)); }
public void HalfStrike() { List <int> pins = new List <int> { 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (10 + 1) + (1 + 1) * 9)); }
public void TenStrike() { List <int> pins = new List <int> { 10, 0, 0, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (10 + 10 + 10 + 1) + (1 + 1) * 7 + 30)); }
public void twoStricke() { List <int> pins = new List <int> { 10, 0, 10, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (10 + 10 + 0) + (10 + 1 + 1) + (1 + 1) * 8)); }
public void Spear() { List <int> pins = new List <int> { 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (5 + 5 + 1) + (1 + 1) * 9)); }
public void AllOnes() { List <Game.set> pins = new List <Game.set>(); for (int i = 0; i < 10; i++) { pins.Add(new Game.set(1, 1, 0, false)); } Assert.That(Game.GetScore(pins), Is.EqualTo((1 + 1) * 10)); }
public void AllZero() { List <Game.set> pins = new List <Game.set>(); for (int i = 0; i < 10; i++) { pins.Add(new Game.set(0, 0, 0, false)); } Assert.That(Game.GetScore(pins), Is.EqualTo(0)); }
public void OneStrike2() { List <int> pins = new List <int> { 1, 1, 10, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; Assert.That(Game.GetScore(pins), Is.EqualTo( (10 + 1 + 1) + (1 + 1) * 9)); }
public void allStrike() { List <List <int> > pins = new List <List <int> >(10); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 10, 10, 10 }); Assert.That(Game.GetScore(pins), Is.EqualTo( 300)); }
public void OneStrike() { List <List <int> > pins = new List <List <int> >(10); pins.Add(new List <int> { 10 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); Assert.That(Game.GetScore(pins), Is.EqualTo( (10 + 1 + 1) + (1 + 1) * 9)); }
public void AllOnes() { List <List <int> > pins = new List <List <int> >(10); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); pins.Add(new List <int> { 1, 1 }); Assert.That(Game.GetScore(pins), Is.EqualTo((1 + 1) * 10)); }
public void AllZero() { List <List <int> > pins = new List <List <int> >(10); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); pins.Add(new List <int> { 0, 0 }); Assert.That(Game.GetScore(pins), Is.EqualTo(0)); }