Last active
December 12, 2015 00:58
-
-
Save eriknomitch/4687133 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defclass checker () | |
((x :accessor checker-x | |
:initarg :x) | |
(y :accessor checker-y | |
:initarg :y) | |
(color :accessor checker-color | |
:initarg :color) | |
(king :accessor checker-king | |
:initarg :king | |
:initform nil))) | |
(defmethod checker-info ((checker checker)) | |
(format t "x:~a, y:~a, color:~a, king:~a~%" | |
(checker-x checker) | |
(checker-y checker) | |
(checker-color checker) | |
(checker-king checker))) | |
(defvar *checker-0* (make-instance 'checker :x 0 :y 0 :color :red)) | |
(defvar *checker-1* (make-instance 'checker :x 0 :y 0 :color :black)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment