Skip to content

Instantly share code, notes, and snippets.

@jsmpereira
Last active December 15, 2015 01:18
Show Gist options
  • Save jsmpereira/5178674 to your computer and use it in GitHub Desktop.
Save jsmpereira/5178674 to your computer and use it in GitHub Desktop.
(defparameter *world* nil)
(defclass tile ()
((x :initarg :x
:accessor x)
(y :initarg :y
:accessor y)
(size :initarg :size
:accessor size)
(color :initarg :color
:accessor color)
(tile-type :initarg :tile-type
:accessor tile-type))
(:default-initargs
:size *tile-size*
:tile-type :dirt))
;;; ... more code
(defun reset ()
(setf *world* (make-array '(30 40) :element-type 'tile)) ;; undefined type: TILE
(setup-world)
(setf *entities* nil))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment