예제 #1
0
 def test_folded_twenty_steps(self):
     cave = load_cave(
         get_test_file_path("samples/d23/unfolded/twenty_steps.txt"))
     cost = 7000 + 8 + 3000 + 4 + 4 + 4000 + 40 + 11 * 1000 + 5 + 9000
     cost += 70 + 600 + 50 + 60 + 40 + 5000 + 600 + 600 + 30 + 8
     print(cost)
     self.assertEqual(find_completion_cost(cave), cost)
예제 #2
0
 def test_example(self):
     cave = load_cave(
         get_test_file_path("samples/d23/example1.txt"))  #############
     #AA.......AD#
     ###D#B#C#.###
     #D#B#C#D#
     #A#B#C#.#
     #.#B#C#.#
     #########
     self.assertEqual(find_completion_cost(cave), 12521)
     #self.assertEqual(0, 12521)
     pass
예제 #3
0
 def test_folded_ten_steps(self):
     cave = load_cave(
         get_test_file_path("samples/d23/unfolded/ten_steps.txt"))
     cost = 7000 + 8 + 3000 + 4 + 4 + 4000 + 40 + 11 * 1000 + 5 + 9000
     self.assertEqual(find_completion_cost(cave), cost)
예제 #4
0
 def test_folded_example(self):
     cave = load_cave(
         get_test_file_path("samples/d23/unfolded/example.txt"))
     self.assertEqual(find_completion_cost(cave), 44169)
     pass
예제 #5
0
 def test_three_steps(self):
     cave = load_cave(get_test_file_path("samples/d23/three_steps.txt"))
     self.assertEqual(find_completion_cost(cave), 7008)
예제 #6
0
 def test_one_folded_step(self):
     cave = load_cave(
         get_test_file_path("samples/d23/unfolded/one_step.txt"))
     self.assertEqual(find_completion_cost(cave), 3000)