not stable yet, but you can use core.async for scripting.

This commit is contained in:
=
2014-09-15 16:26:14 -07:00
parent cf44afc6df
commit a9b5876d1f
3 changed files with 150 additions and 103 deletions

View File

@@ -8,11 +8,6 @@
(terminate [this state]))
(defmacro do-actions [name & forms]
`(vector ~@(for [form forms]
`(fn [~name]
~form))))
(defn talk [action-channel who text]
(let [c (chan)]
@@ -86,8 +81,7 @@
(defn test-run []
(let [state {:x 0 :y 0 :time 0 :items #{} :current-action nil}
action-channel (chan)
script (run-script state action-channel)
]
script (run-script state action-channel)]
(script action-channel)
(loop [state state
current-action nil