Skip to content

Instantly share code, notes, and snippets.

@gmalysa
Created November 7, 2015 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmalysa/6495cd31dc9d4305d20a to your computer and use it in GitHub Desktop.
Save gmalysa/6495cd31dc9d4305d20a to your computer and use it in GitHub Desktop.
(defvar friends (evar friends '()))
(defvar enemies (evar enemies '()))
(defun start
(say "Halt, who goes there?")
(add-response "A friend." add-friend)
(add-response "An enemy." add-enemy))
(defun add-friend
(set-var! friends (cons (get-name character) friends))
(show-list friends))
(defun add-enemy
(set-var! enemies (cons (get-name character) enemies))
(show-list enemies))
(defun (show-list l)
(describe (join " " l)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment