Skip to content

Commit

Permalink
Revert last commit: keep cap5 more simple without defpackage
Browse files Browse the repository at this point in the history
As the base of all game engine is using symbols, this will throw a
painful print with prefixed namespaces.

Like this:

> (text-game-engine:game-repl)
look
Text-game-engine:I text-game-engine:don't text-game-engine:know
text-game-engine:that text-game-engine:command

NOO. Fuck up.
  • Loading branch information
ryukinix committed Mar 15, 2017
1 parent 5c0e1a8 commit 7bea01c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions land-of-lisp/cap5-building-a-text-game-engine.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
;; 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 @@ -47,7 +42,7 @@


;; commands whose the user can be type at repl
(defparameter *allowed-commands* '(inventory look walk pickup drop))
(defparameter *allowed-commands* '(inventory look walk pickup drop help))

;; a lot of tests for running
;; on the end of that script
Expand Down Expand Up @@ -256,5 +251,5 @@
(defun run-tests (tests)
(mapcar #'eval-printing tests))

(eval-when (:compile-toplevel)
(run-tests *tests*))
(defun simple-test ()
(princ (princ 'quit)))

0 comments on commit 7bea01c

Please sign in to comment.