summaryrefslogtreecommitdiff
path: root/addons/life/life.script
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 14:27:06 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:53:45 -0300
commit333cdea69956adda91f462980a18f5bac6548dda (patch)
tree641e3226c4ce0192bbdab3ad167248f120d9ab8b /addons/life/life.script
parent31706a1d1c13c26c69f67f107b72179019cbd255 (diff)
downloadpardes-333cdea69956adda91f462980a18f5bac6548dda.tar.gz
pardes-333cdea69956adda91f462980a18f5bac6548dda.zip
kinds #27, life: addons/life/life.zig is a second shipped Zig addon, Conway's Life in a pane written clean-room against src/kinds/addon.zig and the header alone (steps ten generations a second while focused, space pauses, r reseeds, hjkl and x edit, the prefix the generation and alive count, the body the board, dump and load the board), with its script and golden under addon-test and its own zig tests; the module's timing test and the dogfood that found Kind.step's stale tick clock
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'addons/life/life.script')
-rw-r--r--addons/life/life.script24
1 files changed, 24 insertions, 0 deletions
diff --git a/addons/life/life.script b/addons/life/life.script
new file mode 100644
index 00000000..fba9cd62
--- /dev/null
+++ b/addons/life/life.script
@@ -0,0 +1,24 @@
+# pardes --addon-test life.so addons/life/life.script | diff addons/life/life.out -
+seed 7
+size 40 36
+tick 100
+tick 100
+tick 100
+# x, Space (pause), x: the cell under the cursor toggled twice
+key x x
+tick 300
+key lljx
+key k
+body
+dump
+key r
+# h, Space (resume; a line's ends are trimmed), l. The tick after a key is
+# handed the time of the last tick, from before the paused 300 ms, so the
+# next tick 100 catches up four generations.
+key h l
+tick 100
+tick 100
+blur
+tick 300
+focus
+tick 200