public void testStrikeSpare() { List <frame> frameList = new List <frame>() { new frame(10, 0), new frame(0, 10), new frame(10, 0), new frame(10, 0) }; GameScorer scorer = new GameScorer(frameList); Assert.Equal(20, scorer.scoreFrame(0)); Assert.Equal(20, scorer.scoreFrame(1)); }
public void testSplit() { List <frame> frameList = new List <frame>() { new frame(0, 10), new frame(2, 2), new frame(3, 7), new frame(6, 4) }; GameScorer scorer = new GameScorer(frameList); Assert.Equal(12, scorer.scoreFrame(0)); Assert.Equal(16, scorer.scoreFrame(2)); }
public void testStrike() { List <frame> frameList = new List <frame>() { new frame(10, 0), new frame(10, 0), new frame(10, 0), new frame(1, 1) }; GameScorer scorer = new GameScorer(frameList); Assert.Equal(30, scorer.scoreFrame(0)); Assert.Equal(12, scorer.scoreFrame(2)); }
public void testBasicFrameScores(int roll1, int roll2, int expected) { List <frame> frameList = new List <frame>() { new frame(roll1, roll2) }; GameScorer scorer = new GameScorer(frameList); Assert.Equal(expected, scorer.scoreFrame(0)); }