summaryrefslogtreecommitdiffstats
path: root/19/py/d20.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-23 08:14:30 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-23 14:44:24 +0100
commitf546d8a4e55ac046ecddb00e41e72f6e599446f4 (patch)
tree280a7e0af37ea4d5373d44980242e798ffc9b3d2 /19/py/d20.py
parent8a8772b56d31ae92d120778129db04fb378043dc (diff)
downloadaoc-f546d8a4e55ac046ecddb00e41e72f6e599446f4.tar.gz
Cleanup
Diffstat (limited to '19/py/d20.py')
-rw-r--r--19/py/d20.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/19/py/d20.py b/19/py/d20.py
index 2a248ac..4fa5fc2 100644
--- a/19/py/d20.py
+++ b/19/py/d20.py
@@ -115,21 +115,13 @@ def pt1(input):
print(draw(maze, around=p))
sys.exit()
alone_portals[portal] = location
- #print(draw(maze, start=start, end=end, portals=portal_pairs))
-
- INSIDE_X_LO = 20
- INSIDE_X_HI = 120
- INSIDE_Y_LO = 20
- INSIDE_Y_HI = 100
# find shortest path between each portal (and start/end)
h = []
visited = set(start)
heap.heappush(h, (0, start))
while len(h) > 0:
- cur = heap.heappop(h)
- dist = cur[0]
- point = cur[1]
+ dist, point = heap.heappop(h)
x = point[0]
y = point[1]
if point == end: