so turtle graphics appears to work?

This commit is contained in:
Scott Richmond 2025-06-24 15:58:14 -04:00
parent d9f0b44bed
commit 4f80c500a2
2 changed files with 18 additions and 10 deletions

View File

@ -1,11 +1,19 @@
box foos = [] fn circle! () -> repeat 20 {
fd! (2)
fn foo! () -> update! (foos, append (_, :foo)) rt! (inv (20))
fn foos! () -> repeat 4 {
foo! ()
} }
foos! () fn flower! () -> repeat 10 {
circle! ()
rt! (inv (10))
}
unbox (foos) fn garland! () -> repeat 10 {
flower! ()
fd! (30)
}
garland! ()
do turtle_commands > unbox > print!
do turtle_state > unbox > print!

View File

@ -3,8 +3,8 @@ use imbl::HashMap;
use std::env; use std::env;
use std::fs; use std::fs;
const DEBUG_SCRIPT_COMPILE: bool = true; const DEBUG_SCRIPT_COMPILE: bool = false;
const DEBUG_SCRIPT_RUN: bool = true; const DEBUG_SCRIPT_RUN: bool = false;
const DEBUG_PRELUDE_COMPILE: bool = false; const DEBUG_PRELUDE_COMPILE: bool = false;
const DEBUG_PRELUDE_RUN: bool = false; const DEBUG_PRELUDE_RUN: bool = false;