2024-07-31 23:25:22 +00:00
|
|
|
import {run, svg} from "./ludus.mjs"
|
|
|
|
|
|
|
|
const code = `
|
2024-11-03 21:45:20 +00:00
|
|
|
|
|
|
|
let home = unbox (turtle_state)
|
|
|
|
|
|
|
|
fd! (100)
|
|
|
|
rt! (0.25)
|
|
|
|
fd! (100)
|
|
|
|
|
|
|
|
loadstate! (home)
|
|
|
|
|
|
|
|
rt! (0.25)
|
|
|
|
fd! (100)
|
|
|
|
|
|
|
|
do turtle_state > unbox
|
|
|
|
|
|
|
|
`
|
2024-07-31 23:25:22 +00:00
|
|
|
|
|
|
|
const result = run(code)
|
|
|
|
|
2024-08-01 22:50:09 +00:00
|
|
|
console.log(svg(result.io.turtle.data))
|