diff options
author | Florian Jung <flo@windfisch.org> | 2015-09-03 17:07:30 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-09-03 17:07:30 +0200 |
commit | 9dedf2e0cedf9a068ce4f6a8733ccfc2ef174157 (patch) | |
tree | 431bc91dd1396e3a2b90b5f4653ed4cf0f645e57 /pathfinding.py | |
parent | 0c6dc24617cd952e7ac2f7d10db9796e054adc3c (diff) |
works again
Diffstat (limited to 'pathfinding.py')
-rw-r--r-- | pathfinding.py | 4 |
1 files 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) |