From 570fe8dadca9e8c4d09f1ec6f19d9271aafa4a97 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 22 Jan 2023 19:05:35 +0000 Subject: [PATCH] test list for wrapping around a sphere --- rover.fnl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rover.fnl b/rover.fnl index 91c7810..c505434 100644 --- a/rover.fnl +++ b/rover.fnl @@ -118,4 +118,10 @@ {:x 2 :y 4 :direction :e})) +"if we travel west past x=-180, x becomes positive 180" +"if we travel east past x=180, x becomes -180" +"if we travel east/west at a non-zero latitude, we don't move a full unit" +"if we arrive at the north pole, we are {:y 90 :direction :s}" +"if we arrive at the north pole and turn 90 degrees left, x = x - 90" + (print "OK")