From 4583951463542897af2c27ce0fb2634bd280adea Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Sat, 5 Jul 2025 15:57:05 -0400 Subject: [PATCH] massage prelude into multiturtles; wip Former-commit-id: f1f954de46e28d7ba4a87ae37a034ac77f90acd5 --- assets/test_prelude.ld | 20 ++++++++++---------- pkg/rudus_bg.wasm | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/test_prelude.ld b/assets/test_prelude.ld index c681308..85e2809 100644 --- a/assets/test_prelude.ld +++ b/assets/test_prelude.ld @@ -1071,49 +1071,49 @@ fn add_command! (turtle_id, command) -> { } fn forward! { - "Moves the turtle forward by a number of steps. Alias: fd!" + "Moves the turtle forward by a number of steps. Alias: `fd!`" (steps as :number) -> add_command! (:turtle_0, (:forward, steps)) } let fd! = forward! fn back! { - "Moves the turtle backward by a number of steps. Alias: bk!" + "Moves the turtle backward by a number of steps. Alias: `bk!`" (steps as :number) -> add_command! (:turtle_0, (:back, steps)) } let bk! = back! fn left! { - "Rotates the turtle left, measured in turns. Alias: lt!" + "Rotates the turtle left, measured in turns. Alias: `lt!`" (turns as :number) -> add_command! (:turtle_0, (:left, turns)) } let lt! = left! fn right! { - "Rotates the turtle right, measured in turns. Alias: rt!" + "Rotates the turtle right, measured in turns. Alias: `rt!`" (turns as :number) -> add_command! (:turtle_0, (:right, turns)) } let rt! = right! fn penup! { - "Lifts the turtle's pen, stopping it from drawing. Alias: pu!" + "Lifts the turtle's pen, stopping it from drawing. Alias: `pu!`" () -> add_command! (:turtle_0, (:penup)) } let pu! = penup! fn pendown! { - "Lowers the turtle's pen, causing it to draw. Alias: pd!" + "Lowers the turtle's pen, causing it to draw. Alias: `pd!`" () -> add_command! (:turtle_0, (:pendown)) } let pd! = pendown! fn pencolor! { - "Changes the turtle's pen color. Takes a single grayscale value, an rgb tuple, or an rgba tuple. Alias: pc!" + "Changes the turtle's pen color. Takes a single grayscale value, an rgb tuple, or an rgba tuple. Alias: `pencolour!`, `pc!`" (color as :keyword) -> add_command! (:turtle_0, (:pencolor, color)) (gray as :number) -> add_command! (:turtle_0, (:pencolor, (gray, gray, gray, 255))) ((r as :number, g as :number, b as :number)) -> add_command! (:turtle_0, (:pencolor, (r, g, b, 255))) @@ -1125,14 +1125,14 @@ let pencolour! = pencolor! let pc! = pencolor! fn penwidth! { - "Sets the width of the turtle's pen, measured in pixels. Alias: pw!" + "Sets the width of the turtle's pen, measured in pixels. Alias: `pw!`" (width as :number) -> add_command! (:turtle_0, (:penwidth, width)) } let pw! = penwidth! fn background! { - "Sets the background color behind the turtle and path. Alias: bg!" + "Sets the background color behind the turtle and path. Alias: `bg!`" (color as :keyword) -> add_command! (:turtle_0, (:background, color)) (gray as :number) -> add_command! (:turtle_0, (:background, (gray, gray, gray, 255))) ((r as :number, g as :number, b as :number)) -> add_command! (:turtle_0, (:background, (r, g, b, 255))) @@ -1234,7 +1234,7 @@ fn pendown? { } fn pencolor { - "Returns the turtle's pen color as an (r, g, b, a) tuple or keyword." + "Returns the turtle's pen color as an (r, g, b, a) tuple or keyword. Alias: `pencolour`." () -> do turtle_states > unbox > :turtle_0 > :pencolor } diff --git a/pkg/rudus_bg.wasm b/pkg/rudus_bg.wasm index 2e784ac..408fd11 100644 --- a/pkg/rudus_bg.wasm +++ b/pkg/rudus_bg.wasm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1708da6b36b953a693012997548256387d298308d5c004a1c54436a2ca0249c8 -size 16757676 +oid sha256:ea5f0d05388f42e79eba53c4ad4a3bc3321563a8b7b004daef258d72fe419328 +size 16757732