summaryrefslogtreecommitdiffstats
path: root/algorithms.py
diff options
context:
space:
mode:
Diffstat (limited to 'algorithms.py')
-rw-r--r--algorithms.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/algorithms.py b/algorithms.py
index 6e01287..7126fb6 100644
--- a/algorithms.py
+++ b/algorithms.py
@@ -1,5 +1,7 @@
import heapq
import math
+import util
+from debug_draw import DebugDraw
def length_haversine(p1, p2):
@@ -28,6 +30,8 @@ def get_closest_node_id(nodes, source_node):
min_node = node_id
min_value = length
+ grid_p = nodes[min_node].coord_tuple()
+ DebugDraw.add_square(util.to_grid(grid_p), util.to_grid(grid_p, +1))
return min_node