From 6ed45d319bba6e4d5c5c089bc492693f7ec0b9fd Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sat, 12 Dec 2020 12:39:56 -0500 Subject: [PATCH] make 180 match the other reassignments --- 12/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/12/main.go b/12/main.go index 43cf118..d88f90e 100644 --- a/12/main.go +++ b/12/main.go @@ -124,8 +124,7 @@ func rotateShip(current rune, degrees int, rl rune) rune { func rotateWaypoint(w waypoint, action rune, vector int) waypoint { if vector == 180 { - w.horizontal = -w.horizontal - w.vertical = -w.vertical + w.horizontal, w.vertical = -w.horizontal, -w.vertical } else if action == 'R' { if vector == 90 { w.horizontal, w.vertical = w.vertical, -w.horizontal