From 38032fbb6e71f2bebb29ab77c34e330740c858b0 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Sat, 12 Dec 2020 06:53:18 +0100 Subject: [PATCH] day12: no need to re-evaluate where in p2 --- day12.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/day12.py b/day12.py index b9fc960..1acd333 100644 --- a/day12.py +++ b/day12.py @@ -48,8 +48,7 @@ def moveWaypoint(instruction, posShipX, posShipY, posWaypointX, posWaypointY): if where == 'F': posShipX += posWaypointX * dist posShipY += posWaypointY * dist - - if where == 'N': + elif where == 'N': posWaypointY -= dist elif where == 'S': posWaypointY += dist