diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-13 19:25:32 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2019-12-13 19:25:32 +0100 |
| commit | 186070aedc2fc45ac8d6cb5762c0de9af1855ba1 (patch) | |
| tree | c1b6ea8f158aec99395a54e4882385f967da8939 /solutions/py/d13.py | |
| parent | bb432b66d00deb7d4a259389fe45fba7bac202cc (diff) | |
| download | aoc-186070aedc2fc45ac8d6cb5762c0de9af1855ba1.tar.gz | |
Minor speed-ups
Diffstat (limited to 'solutions/py/d13.py')
| -rw-r--r-- | solutions/py/d13.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/solutions/py/d13.py b/solutions/py/d13.py index 78fc423..88b0fa2 100644 --- a/solutions/py/d13.py +++ b/solutions/py/d13.py @@ -105,7 +105,7 @@ def visualize(input): while c.memory[c.pointer] != 99: if c.wants_input: - time.sleep(0.005) + time.sleep(0.01) frame_n += 1 frame, points, ball_x, paddle_x = draw(screen, points) print(frame) @@ -127,9 +127,6 @@ if __name__ == "__main__": import cProfile _input = open("../input/13", "r").readlines() - cProfile.run("pt1(_input)") - cProfile.run("pt2(_input)") print(pt1(_input)) print(pt2(_input)) - if input("Visualize? [Y/n]: ") == "y": - visualize(_input) + #visualize(_input) |
