Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save earl-ducaine/d538cff96e7f3508ec1af178884a3dd2 to your computer and use it in GitHub Desktop.
Save earl-ducaine/d538cff96e7f3508ec1af178884a3dd2 to your computer and use it in GitHub Desktop.
(defclass plane (moving-object graphics-object)
((altitude :initform 0 :accessor plane-altitude)
(speed))
(:default-initargs :engine *jet*))
(ensure-class 'plane
':direct-superclasses '(moving-object graphics-object)
':direct-slots (list (list ':name 'altitude
':initform '0
':initfunction #'(lambda () 0)
':readers '(plane-altitude)
':writers '((setf plane-altitude)))
(list ':name 'speed))
':direct-default-initargs (list (list ':engine
'*jet*
#'(lambda () *jet*))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment