c1fba0f3ec5f

Minor cleanup.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 14 Jul 2012 14:44:22 -0400
parents 64208ea405c0
children 130e2fc7c495
branches/tags (none)
files src/caves/core.clj src/caves/entities/aspects/destructible.clj

Changes

--- a/src/caves/core.clj	Sat Jul 14 14:35:05 2012 -0400
+++ b/src/caves/core.clj	Sat Jul 14 14:44:22 2012 -0400
@@ -18,7 +18,7 @@
 
 (defn run-game [game screen]
   (loop [{:keys [input uis] :as game} game]
-    (when-not (empty? uis)
+    (when (seq uis)
       (if (nil? input)
         (do
           (draw-game game screen)
--- a/src/caves/entities/aspects/destructible.clj	Sat Jul 14 14:35:05 2012 -0400
+++ b/src/caves/entities/aspects/destructible.clj	Sat Jul 14 14:44:22 2012 -0400
@@ -7,4 +7,4 @@
     (let [damaged-this (update-in this [:hp] - damage)]
       (if-not (pos? (:hp damaged-this))
         (update-in world [:entities] dissoc id)
-        (update-in world [:entities id] assoc damaged-this)))))
+        (assoc-in world [:entities id] damaged-this)))))