summaryrefslogtreecommitdiffstats
path: root/solutions/py/08.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-08 08:01:39 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-08 08:01:39 +0100
commitd16fc72a33fced8c8623bea6cf9cdd9cf8999024 (patch)
tree6e961100ba952b028357154427f262a905a17e0e /solutions/py/08.py
parenta6e787756d96ebe1fcc5373ad643ec56a3da82aa (diff)
downloadaoc-d16fc72a33fced8c8623bea6cf9cdd9cf8999024.tar.gz
Refactor day 8 again
Diffstat (limited to 'solutions/py/08.py')
-rw-r--r--solutions/py/08.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/solutions/py/08.py b/solutions/py/08.py
index 247b221..c57cb4c 100644
--- a/solutions/py/08.py
+++ b/solutions/py/08.py
@@ -15,14 +15,6 @@ for l in range(100):
img.append(layer)
print(1, n)
-
-def pretty(result):
- for row in result:
- for c in row:
- print(('\u2588' if c == 1 else ' '), end='')
- print("")
-
-
result = img[0]
for layer in img[1:]:
for x in range(25):
@@ -30,4 +22,7 @@ for layer in img[1:]:
if result[y][x] == 2:
result[y][x] = layer[y][x]
print(2)
-pretty(result)
+for row in result:
+ for c in row:
+ print(('\u2588' if c == 1 else ' '), end='')
+ print("")