; 잃어버린 땔깜을 찾아서


(defparameter *nodes* '((dc-inside (you are in the wastebasket. there are simple aggro.))

                        (code-inside(you are in the set of leap tunnel. some flag of victory shout out to universe.))

                        (si-enterprise (just today, java du meung tayo.))

                        (heaven (some of anime-any-character sits wide open pussy.))))


(defparameter *jump* '((dc-inside (code-inside another new-technology)

                                  (si-enterprise hell firewood)

                                  (heaven escape-chosun new-world))

                       (code-inside (dc-inside another old-technology))

                       (si-enterprise (de-inside heaven entrance-not-found))

                       (heaven (dc-inside hell why))))


(defparameter *objects* '(trash frog cose hanja-wang tina koromo irene))


(defparameter *objects-loc* '((trash si-enterprise)

                              (frog dc-inside)

                              (cose code-inside)

                              (tina heaven)

                              (hanja-wang code-inside)

                              (koromo code-inside)

                              (irene si-enterprise)))


(defparameter *now-location* 'dc-inside)

(defun describe-loc (loc nodes)
       (cadr (assoc loc nodes)))

(defun describe-path (jump)

       `(there is a ,(caddr jump) village ,(cadr edge) from hell-chosun.))


(defun describe-paths (loc jmp)

         (apply #'append (mapcar #'describe-path (cdr (assoc loc jmp)))))


(defun objects-at (loc objs obj-loc)

       (labels ((tobep (obj)

                       (eq (cadr (assoc obj obj-loc)) loc)))

       (remove-if-not #'tobep objs)))


(defun describe-objects (loc objs obj-loc)

       (labels ((describe-obj (obj)

                `(you see a ,obj on the hell.)))

       (apply #'append (mapcar #'describe-obj (objects-at loc objs obj-loc)))))


(defun look()

       (append (describe-loc *now-location* *nodes*)

               (describe-paths *now-location* *jump*)

               (describe-objects *now-location* *obects* *objects-loc*)))


(defun goto (dir)

       (let ((next (find dir

                         (cdr (assoc *now-location* *jump*))

                               :key #'cadr)))

       (if next

           (progn (setf *now-location* (car next))

                  (look))

          '(you cannot go that way.))))


(defun kidnap (obj)

       (cond ((member obj

                      (objects-at *now-location* *objects* *object-loc*))

              (push (list obj 'body) *object-loc*)

             `(you are now kidnapping the ,obj))

              (t '(you cannot kidnap that.))))


(defun resident ()

       (cons 'items- (objects-at 'body *objects* *object-loc*)))