I'm trying to rewrite the Wizard game from "Land of Lisp" http://landoflisp.com/wizards_game.lisp
(def *nodes* {:living-room "you are in the living-room. a wizard is snoring loudly on the couch."
:garden "you are in a beautiful garden. there is a well in front of you."
:attic "you are in the attic. there is a giant welding torch in the corner."})
(def *edges* {:living-room '((garden west door) (attic upstairs ladder))
:garden '(living-room east door)
:attic '(living-room downstairs ladder)})
(defn describe-location [location nodes]
(nodes location))
(defn describe-path-raw [edge]
`(there is a ~(last edge) going ~(second edge) from here.))
(defn describe-path [edge]
(map #(symbol (name %)) (describe-path-raw edge)))
(defn describe-paths [location edges]
(apply concat (map describe-path-raw (location edges))))
When trying:
(println (describe-paths :attic *edges*))
I got this exception:
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol (wizard-game.clj:0)
I don't have a Lispy eye yet, what I'm doing wrong?