Exemplo n.º 1
0
 def testCalculateCartesanDistanceFromGoalXValueIsOffByNegativeOneYValueIsOffByOneShouldBeTwo(self):
     frontier = GreedyFrontier()
     frontier.set_goal(Point(5, 5))
     self.assertEqual(2, frontier._calculate_cartesan_distance_from_goal(Point(4, 6)))
Exemplo n.º 2
0
 def testCalculateCartesanDistanceFromGoalIsGoalShouldBeZero(self):
     frontier = GreedyFrontier()
     frontier.set_goal(Point(1, 2))
     self.assertEqual(0, frontier._calculate_cartesan_distance_from_goal(Point(1, 2)))