示例#1
0
 def test_mail_example(self):
     g = Game()
     rolls = [10, 3, 7, 6, 1, 10, 10, 10, 2, 8, 9, 0, 7, 3, 10, 10, 10]
     score = g.full_game(rolls)
     self.assertEqual(score, 193)
示例#2
0
 def test_max(self):
     g = Game()
     rolls = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
     score = g.full_game(rolls)
     self.assertEqual(score, 300)
示例#3
0
 def test_fail_miserably(self):
     g = Game()
     rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     score = g.full_game(rolls)
     self.assertEqual(score, 0)
示例#4
0
 def test_simple(self):
     g = Game()
     rolls = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
     score = g.full_game(rolls)
     self.assertEqual(score, 30)