# HG changeset patch # User Steve Losh # Date 1342237290 14400 # Node ID d4d14e381be05a96287803a5d5fa12bb76c5a15e # Parent f5fdc662f11f8a89e534aa11fdf0f47f6a09884e Don't redraw the screen more times than is necessary. diff -r f5fdc662f11f -r d4d14e381be0 src/caves/core.clj --- a/src/caves/core.clj Fri Jul 13 23:34:53 2012 -0400 +++ b/src/caves/core.clj Fri Jul 13 23:41:30 2012 -0400 @@ -19,9 +19,10 @@ (defn run-game [game screen] (loop [{:keys [input uis] :as game} game] (when-not (empty? uis) - (draw-game game screen) (if (nil? input) - (recur (get-input (update-in game [:world] tick-all) screen)) + (do + (draw-game game screen) + (recur (get-input (update-in game [:world] tick-all) screen))) (recur (process-input (dissoc game :input) input)))))) (defn new-game []