not stable yet, but you can use core.async for scripting.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user