diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 13:37:01 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-20 17:36:48 +0100 |
| commit | 86bca81e753786e0b4e9e9d49e88f0f2a579ebba (patch) | |
| tree | 960d72104b1347b5a2133d5483251181b6ed87f2 /algorithms.py | |
| parent | 11e50657c900543856f3a1f56a96d6c861f55b6e (diff) | |
| download | tdde25-86bca81e753786e0b4e9e9d49e88f0f2a579ebba.tar.gz | |
initial debug drawdebug-draw
Diffstat (limited to 'algorithms.py')
| -rw-r--r-- | algorithms.py | 4 |
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 |
