Permalink
Browse files

Mire: better error detection

  • Loading branch information...
1 parent 62ad592 commit a98bce49d8cf07ebdd742eeb0700dd50a845cf35 Andreas Pauley committed Dec 19, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 PeepCode/Clojure/mire/src/mire/commands.clj
@@ -18,12 +18,14 @@
:east (fn [] (move :east))
:south (fn [] (move :south))
:west (fn [] (move :west))
- :look look})
+ :look look
+ :wtf (fn []
+ "Yeah sure, I'll do that right after you grow a brain.")})
(defn execute
"Execute a command passed from the client"
[input]
(let [input-words (re-split #"\s+" input)
command (keyword (first input-words))
args (rest input-words)]
- (apply (command commands) args)))
+ (apply (command commands (:wtf commands)) args)))

0 comments on commit a98bce4

Please sign in to comment.