day12: no need to re-evaluate where in p2

This commit is contained in:
Stefan Harmuth 2020-12-12 06:53:18 +01:00
parent 20e35877e2
commit 38032fbb6e

View File

@ -48,8 +48,7 @@ def moveWaypoint(instruction, posShipX, posShipY, posWaypointX, posWaypointY):
if where == 'F': if where == 'F':
posShipX += posWaypointX * dist posShipX += posWaypointX * dist
posShipY += posWaypointY * dist posShipY += posWaypointY * dist
elif where == 'N':
if where == 'N':
posWaypointY -= dist posWaypointY -= dist
elif where == 'S': elif where == 'S':
posWaypointY += dist posWaypointY += dist