comparison clojure/com/aurellem/gb_driver.clj @ 79:7ab48d728ee4

more stuff.
author Robert McIntyre <rlm@mit.edu>
date Thu, 08 Mar 2012 21:55:40 -0600
parents 9ba461a5c60f
children db8e0a563c8e
comparison
equal deleted inserted replaced
78:4a1b17917fc8 79:7ab48d728ee4
4 (:import org.apache.commons.io.FileUtils) 4 (:import org.apache.commons.io.FileUtils)
5 (:import (java.nio IntBuffer ByteOrder))) 5 (:import (java.nio IntBuffer ByteOrder)))
6 6
7 (Gb/loadVBA) 7 (Gb/loadVBA)
8 8
9 (def ^:dynamic *max-history* 10) 9 (def ^:dynamic *max-history* 1e4)
10 10
11 (def ^:dynamic *backup-saves-to-disk* true) 11 (def ^:dynamic *backup-saves-to-disk* true)
12 12
13 (def ^:dynamic *save-history* true) 13 (def ^:dynamic *save-history* true)
14 14
158 158
159 (defn play 159 (defn play
160 ([] (play Integer/MAX_VALUE)) 160 ([] (play Integer/MAX_VALUE))
161 ([n] (dorun (dotimes [_ n] (step))))) 161 ([n] (dorun (dotimes [_ n] (step)))))
162 162
163 (defmacro without-saves [& forms]
164 `(binding [*save-history* false]
165 ~@forms))
163 166