From 9dedf2e0cedf9a068ce4f6a8733ccfc2ef174157 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Thu, 3 Sep 2015 17:07:30 +0200 Subject: works again --- pathfinding.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pathfinding.py b/pathfinding.py index 61f32a8..7e17daf 100644 --- a/pathfinding.py +++ b/pathfinding.py @@ -81,14 +81,14 @@ class Node: self.find_near_wormholes(50) def find_near_wormholes(self, radius): - self.near_wormholes = [] # list(filter(lambda blob : (self.point - blob.point).len() < radius, self.graph.blobs)) + self.near_wormholes = list(filter(lambda blob : (self.point - blob.point).len() < radius, self.graph.blobs)) def move_cost(self,other): dist = distance(self, other) if not (self.is_in_wormhole_plane or other.is_in_wormhole_plane): # assert other in siblings(self,grid). otherwise this makes no sense #return 5*(distance(self, other) + (self.value + other.value)/2) - return 5*dist + return 5*dist + (self.value + other.value)/2 else: return max(dist, 5*dist - 500) -- cgit v1.2.3