summaryrefslogtreecommitdiffstats
path: root/solutions/py/d13.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-14 09:00:29 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-14 09:00:29 +0100
commit18ee463da09b4f7fd0f5d5bf04690fdb9027bcfb (patch)
tree4186016be62794b603d150fe9122fc9f0519014a /solutions/py/d13.py
parentaf1a6b34c19c50ee36be79ab4d7cdf902f42b99e (diff)
downloadaoc-18ee463da09b4f7fd0f5d5bf04690fdb9027bcfb.tar.gz
Refactor (and faster?) intcode and day 9+13
Diffstat (limited to 'solutions/py/d13.py')
-rw-r--r--solutions/py/d13.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/solutions/py/d13.py b/solutions/py/d13.py
index 88b0fa2..3dbc5fb 100644
--- a/solutions/py/d13.py
+++ b/solutions/py/d13.py
@@ -44,7 +44,7 @@ def pt2(input):
ball_x = paddle_x = 0
while c.memory[c.pointer] != 99:
- if c.wants_input:
+ if c.SIG_INPUT:
points, ball_x, paddle_x = draw(screen, points)
if paddle_x < ball_x:
c.input = 1
@@ -104,7 +104,7 @@ def visualize(input):
ball_x = paddle_x = 0
while c.memory[c.pointer] != 99:
- if c.wants_input:
+ if c.SIG_INPUT:
time.sleep(0.01)
frame_n += 1
frame, points, ball_x, paddle_x = draw(screen, points)