Skip to content

Commit

Permalink
Add defpackage definition as :text-game-engine on cap5
Browse files Browse the repository at this point in the history
This will help me integrate at cap17
  • Loading branch information
ryukinix committed Mar 15, 2017
1 parent e2e9fdf commit 5c0e1a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion land-of-lisp/cap5-building-a-text-game-engine.lisp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
;; Common Lisp Script
;; Manoel Vilela


(defpackage :text-game-engine
(:use :cl))

(in-package :text-game-engine)

;; node (description)
(defparameter *nodes* '((living-room (you are in the living-room.
a wizard is snoring loudly on the couch.))
Expand Down Expand Up @@ -246,7 +252,9 @@
and print the output"
(print (cons 'command-execute-> `(,command)))
(print (cons 'output-of-command-> (eval command))))

(defun run-tests (tests)
(mapcar #'eval-printing tests))

(run-tests *tests*)
(eval-when (:compile-toplevel)
(run-tests *tests*))

0 comments on commit 5c0e1a8

Please sign in to comment.