Пример #1
0
        public void Random_Score_1()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("-25|X|57-|-/|A--|382|C-5|L--|R-2|R/2");
            Assert.AreEqual(156, game.GetTotalScore());
        }
Пример #2
0
        public void Random_Score_2()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("X|X|57-|-/|A--|382|C/|L/|R-2|R/2");
            Assert.AreEqual(212, game.GetTotalScore());
        }
Пример #3
0
        public void Perfect_Game()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("X|X|X|X|X|X|X|X|X|XXX");
            Assert.AreEqual(450, game.GetTotalScore());
        }
Пример #4
0
        public void All_GutterBall_Game()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("---|---|---|---|---|---|---|---|---|---");
            Assert.AreEqual(0, game.GetTotalScore());
        }
Пример #5
0
        public void One_Missed_Strike()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("X|X|X|X|X|X|X|X|X|X-X");
            Assert.AreEqual(420, game.GetTotalScore());
        }
Пример #6
0
        public void No_Score_Until_All_Strikes_in_Last_Frame()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("---|---|---|---|---|---|---|---|---|XXX");
            Assert.AreEqual(45, game.GetTotalScore());
        }
Пример #7
0
        public void All_spares()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("2/|2/|3/|5/|H/|R/|L/|C/|A/|3/X");
            Assert.AreEqual(230, game.GetTotalScore());
        }
Пример #8
0
        public void Strike_adds_only_next_two_balls_score()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("X|223|-");
            Assert.AreEqual(19, game.Frames[0].GetScore());
            Assert.AreEqual(26, game.GetTotalScore());
        }
Пример #9
0
        public void Spare_adds_only_the_next_ball_to_score()
        {
            FivePin game = new FivePin();

            game.ParseGameScore("2/|223");

            Assert.AreEqual(17, game.Frames[0].GetScore());
            Assert.AreEqual(24, game.GetTotalScore());
        }