summaryrefslogtreecommitdiffstats
path: root/19/py/d18.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-18 20:42:42 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-18 20:42:42 +0100
commitf6442664931bff2f37027a0d0eaf706017b5537d (patch)
tree8ec99f538f0fe3ed2aa94081c8b43a1e25dac69d /19/py/d18.py
parent0d473b23584e9f8e87856db167d285cd899347a4 (diff)
downloadaoc-f6442664931bff2f37027a0d0eaf706017b5537d.tar.gz
More day 18 WIP
Diffstat (limited to '19/py/d18.py')
-rw-r--r--19/py/d18.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/19/py/d18.py b/19/py/d18.py
index 61a5cb0..41ade0a 100644
--- a/19/py/d18.py
+++ b/19/py/d18.py
@@ -220,6 +220,7 @@ for path, dist in start_paths.items():
m = 0
while True:
+ print(cur)
cur = heap.heappop(h)
dist = cur[0]
last = cur[1]
@@ -234,8 +235,9 @@ while True:
neighbours = graph[last]
for n in neighbours:
- if n[0] in visited:
- continue
+ #TODO recognize cycles
+ #if n[0] in visited:
+ # continue
if n[0].isupper() and n[0] not in unlocked:
continue
visited = visited.copy()