Пример #1
0
 def test_valid_exit_completion(self):
     cave = load_cave(get_test_file_path("samples/d23/one_step.txt"))
     sorted_caves = SortedCaveList()
     sorted_caves.add(cave)
     possible_caves = get_valid_corridor_exits(sorted_caves.pop())
     self.assertEqual(len(possible_caves), 1)
     self.assertEqual(is_complete(possible_caves[0]), True)
     sorted_caves.add(possible_caves[0])
     self.assertEqual(sorted_caves.has_completion(), True)
Пример #2
0
 def test_not_complete(self):
     cave = load_cave(get_test_file_path("samples/d23/example1.txt"))
     self.assertEqual(is_complete(cave), False)
Пример #3
0
 def test_folded_complete(self):
     cave = load_cave(
         get_test_file_path("samples/d23/unfolded/complete.txt"))
     self.assertEqual(is_complete(cave), True)