summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cactus.lua25
1 files changed, 19 insertions, 6 deletions
diff --git a/cactus.lua b/cactus.lua
index 7558461..08df1aa 100644
--- a/cactus.lua
+++ b/cactus.lua
@@ -96,13 +96,26 @@ local function moveby(delta)
moveby_y(delta.y)
moveby_xz(delta)
end
+local function moveto(target)
+ moveby(target - POS)
+end
local datum = vector.new(-18, 128, -1837)
-local delta = datum - POS
-moveby(delta)
-for i=1,4 do
- move_linear(11)
- turn_right()
-end
+moveto(datum)
+turn_to_face(vector.new(0,0,+1))
+
+repeat
+ do_column()
+ move_linear(1)
+until POS.z == -1826
+do_column()
+turn_right()
+move_linear(1)
+turn_right()
+repeat
+ do_column()
+ move_linear(1)
+until POS.z == datum.z
+