Exemplo n.º 1
0
 def setUp(self):
     self.obstaclesList = [
         Obstacle((120, 120)),
         Obstacle((130, 300)),
         Obstacle((170, 500)),
         Obstacle((335, 200))
     ]
     self.graphGenerator = GraphGenerator(self.obstaclesList, 1000, 600)
     self.graph = self.graphGenerator.generateGraph()
Exemplo n.º 2
0
 def __init__(self, map):
     self.mapAdaptator = MapAdaptator(map)
     obstaclesList, mapSizeX, mapSizeY, minCorner = self.mapAdaptator.getMapInfo(
     )
     self.minCorner = minCorner
     self.graphGenerator = GraphGenerator(obstaclesList, mapSizeX, mapSizeY)
     self.graph = self.graphGenerator.generateGraph()
     self.lineOfSightCalculator = LineOfSightCalculator(self.graph)
     self.pathsList = []
     self.goodPaths = []
     self.indice = 0
     self.theGoodPath = Path()