From 31fe78546e49d996d94074debac81d6eaee99365 Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Sat, 12 Dec 2020 12:10:00 +0100 Subject: [PATCH] Day 12 (made direction order more satisfying) --- day12/part1.py | 4 ++-- day12/part2.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/day12/part1.py b/day12/part1.py index 5ae018e..fb0ccbb 100644 --- a/day12/part1.py +++ b/day12/part1.py @@ -2,8 +2,8 @@ lines = ((x[0], int(x[1:].strip())) for x in open("input.txt")) pos = 0 drctn = 1 -targets = [1j, 1, -1j, -1] -target_str = "NESW" +targets = [1, 1j, -1, -1j] +target_str = "ENWS" for cmd, num in lines: if cmd in target_str: diff --git a/day12/part2.py b/day12/part2.py index d758a86..39ae5f8 100644 --- a/day12/part2.py +++ b/day12/part2.py @@ -2,8 +2,8 @@ lines = ((x[0], int(x[1:].strip())) for x in open("input.txt")) pos = 0 drctn = 10+1j -targets = [1j, 1, -1j, -1] -target_str = "NESW" +targets = [1, 1j, -1, -1j] +target_str = "ENWS" for cmd, num in lines: if cmd in target_str: