summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2022-12-14 13:40:14 +0000
committerTomasz Kramkowski <tomasz@kramkow.ski>2022-12-14 13:40:14 +0000
commit2a3f9398942c2fd1ed199bb917e28d7dac8f6856 (patch)
treedeedc3dad9a62956c844b35d3a89858e04c0e9ea
parenteee071c0cf4b209c1a4ab1ade53fa6012f22f81f (diff)
downloadaoc2022-2a3f9398942c2fd1ed199bb917e28d7dac8f6856.tar.gz
aoc2022-2a3f9398942c2fd1ed199bb917e28d7dac8f6856.tar.xz
aoc2022-2a3f9398942c2fd1ed199bb917e28d7dac8f6856.zip
14 use source when positioning floor
-rw-r--r--14.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/14.py b/14.py
index fa81fec..57b94a0 100644
--- a/14.py
+++ b/14.py
@@ -71,7 +71,7 @@ print(p1)
floory = sandbox.maxy + 2
height = floory - sandbox.source[1]
-for x in range(500 - height, 500 + height + 1):
+for x in range(sandbox.source[0] - height, sandbox.source[0] + height + 1):
sandbox[x, floory] = Tile.WALL
print(p1 + sandbox.simulate())