Mercurial > vba-clojure
comparison clojure/com/aurellem/gb/gb_driver.clj @ 316:d263df762c59
greatly speed up scroll-text by using binary-search.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 02 Apr 2012 21:20:54 -0500 |
parents | d5dddf33543c |
children | 8484e6f6db2c |
comparison
equal
deleted
inserted
replaced
315:363b650a77cc | 316:d263df762c59 |
---|---|
140 ([state] | 140 ([state] |
141 (play state Integer/MAX_VALUE)) | 141 (play state Integer/MAX_VALUE)) |
142 ([] | 142 ([] |
143 (continue! @current-state))) | 143 (continue! @current-state))) |
144 | 144 |
145 (defn run-moves [state moves] | 145 (defn run-moves [moves state] |
146 (set-state! state) | 146 (set-state! state) |
147 (dorun (map #(Gb/step (button-mask %)) | 147 (dorun (map #(Gb/step (button-mask %)) |
148 moves)) | 148 moves)) |
149 (update-state)) | 149 (update-state)) |
150 | 150 |