summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-11 10:14:24 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-11 10:14:24 +0100
commite4a2e64781c36d942ddfe86c42409bfbfb2a1be2 (patch)
tree20f2d88aacf606324dc16689bee6704fae6cda22
parent5366f49af365059e0d791290058aaae606f642ed (diff)
downloadaoc-e4a2e64781c36d942ddfe86c42409bfbfb2a1be2.tar.gz
Fix output
-rw-r--r--solutions/py/d11.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/solutions/py/d11.py b/solutions/py/d11.py
index d0b6094..e9b280c 100644
--- a/solutions/py/d11.py
+++ b/solutions/py/d11.py
@@ -19,9 +19,9 @@ def draw(colors, ship, direction):
min_y = min(min_y, color[1])
max_y = max(max_y, color[1])
s = ""
- for y in range(min_y-1, max_y+2):
+ for y in range(min_y, max_y+1):
s += "\n"
- for x in range(min_x-1, max_x+1):
+ for x in range(min_x, max_x+1):
if (x,y) == ship:
s += ship_c
elif (x,y) in colors: