summary history branches tags files
commit:e55c3a85da6d7533751c497390b482a1969ad843
author:mrmekon
committer:mrmekon
date:Fri Apr 6 18:45:43 2012 -0400
parents:7ab90fca4df1fff9a9b4fdccaafb1ce7a41d8b1c
Don't allow player to move after he's captured
diff --git a/tempest/tempest/core.cljs b/tempest/tempest/core.cljs
line changes: +1/-1
index 5e1c1a4..83a7232
--- a/tempest/tempest/core.cljs
+++ b/tempest/tempest/core.cljs
@@ -712,7 +712,7 @@ again with the current deref of the global state.
       state
       (let [key (first queue)
             valid? (compare-and-set! *key-event-queue* queue (rest queue))]
-        (if valid?
+        (if (and valid? (not (:captured? (:player game-state))))
           (recur (handle-keypress state key) @*key-event-queue*)
           (recur state @*key-event-queue*))))))