예제 #1
0
 def test_play_game7(self):
     starting_numbers = [3, 1, 2]
     memory.seed(starting_numbers)
     memory.play_game(2020)
     expected_number = 1836
     self.assertEqual(expected_number, memory.numbers[-1])
예제 #2
0
 def test_play_game4(self):
     starting_numbers = [1, 2, 3]
     memory.seed(starting_numbers)
     memory.play_game(2020)
     expected_number = 27
     self.assertEqual(expected_number, memory.numbers[-1])
예제 #3
0
 def test_play_game6(self):
     starting_numbers = [3, 2, 1]
     memory.seed(starting_numbers)
     memory.play_game(2020)
     expected_number = 438
     self.assertEqual(expected_number, memory.numbers[-1])
예제 #4
0
 def test_large_iterations(self):
     starting_numbers = [0, 3, 6]
     memory.seed(starting_numbers)
     memory.play_game(30000000)
     expected_number = 175594
     self.assertEqual(expected_number, memory.numbers[-1])