示例#1
0
 def test_sixth_example(self):
     my_game = ElfGame([3, 2, 1])
     my_game.advance_to_turn(2020)
     should_be = 438
     self.assertEqual(my_game.last_number_spoken, should_be)
示例#2
0
 def test_first_example(self):
     my_game = ElfGame([0, 3, 6])
     my_game.advance_to_turn(10)
     should_be = 0
     self.assertEqual(my_game.last_number_spoken, should_be)
示例#3
0
 def test_fourth_example(self):
     my_game = ElfGame([1, 2, 3])
     my_game.advance_to_turn(2020)
     should_be = 27
     self.assertEqual(my_game.last_number_spoken, should_be)
示例#4
0
 def test_third_example(self):
     my_game = ElfGame([2, 1, 3])
     my_game.advance_to_turn(2020)
     should_be = 10
     self.assertEqual(my_game.last_number_spoken, should_be)
示例#5
0
 def test_second_example(self):
     my_game = ElfGame([1, 3, 2])
     my_game.advance_to_turn(2020)
     should_be = 1
     self.assertEqual(my_game.last_number_spoken, should_be)
示例#6
0
 def test_seventh_example(self):
     my_game = ElfGame([3, 1, 2])
     my_game.advance_to_turn(30000000)
     should_be = 362
     self.assertEqual(my_game.last_number_spoken, should_be)
示例#7
0
 def test_fifth_example(self):
     my_game = ElfGame([2, 3, 1])
     my_game.advance_to_turn(30000000)
     should_be = 6895259
     self.assertEqual(my_game.last_number_spoken, should_be)