make 180 match the other reassignments

This commit is contained in:
David 2020-12-12 12:39:56 -05:00
parent 1124022f4f
commit 6ed45d319b

View File

@ -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