Esempio n. 1
0
 def test_trapped2(self):
     """Should return `False` if there's no way out"""
     maze = "\n".join(["......",
                       "......",
                       "......",
                       "......",
                       ".....W",
                       "....W."])
     self.assertFalse(main.path_finder(maze))
Esempio n. 2
0
 def test_exitable2(self):
     """Should return `10` if the shortest way out is 10 steps"""
     maze = "\n".join(["......",
                       "......",
                       "......",
                       "......",
                       "......",
                       "......"])
     self.assertTrue(main.path_finder(maze))
Esempio n. 3
0
 def test_exitable1(self):
     """Should return `True` if there's a way out"""
     maze = "\n".join([".W.", ".W.", "..."])
     self.assertTrue(main.path_finder(maze))