anchor.diff:                              ((:u :up u up)       :u)
                               ((:d :down d down)   :d)
                               ((:q :quit q quit :exit exit
  -                              :abort abort :break break)
  +                               :abort abort :break break)
                                (return-from play))
                               (otherwise input))))
  -                (setf square (aref (places self) x y)))
  -            (error (err) (format t "~A~%" err) (go :loop))))
  -         (otherwise (format t "Invalid input.~%") (go :loop)))
  -       (move-square self x y)))));;play
  +                  ;; (setf square (aref (places self) x y))
  +                  )
  +              (error (err) (format t "~A~%" err) (go :loop))))
  +           (otherwise (format t "Invalid input.~%") (go :loop)))
  +         ;; (format t "Moving square ~S~%" square)
  +         (move-square self x y)))))
   
   
   (defun main ()
  
positive.code:         ((:r) (when (< y (1- (size self))) (return (values x (1+ y)))))
          (otherwise
           (error "Invalid relative move, must be (member :l :r :u :d).")))
        (error "Cannot move empty toward this direction."))));;get-coordinates
  
      
  
  (defmethod get-movable-list ((self puzzle))
    (mapcan
     (lambda (d) (handler-case
                (multiple-value-bind (x y) (get-coordinates self d)
                  (list (list d (aref (places self) x y))))
              (error () nil)))
     '(:l :r :u :d)));;get-movable-list
  
  
  
  
negative.code: (defgeneric play             (puzzle))
  
  
  (defun shuffle (list)
    (let ((vector (coerce list 'vector)))
      (loop :for i :from (1- (length vector)) :downto 2
            :do (rotatef (aref vector i) (aref vector (random i))))
      (coerce vector 'list)))
  
  (defmethod initialize-instance ((self puzzle) &rest args)
    (declare (ignore args))
    (call-next-method)
    (let ((places (make-array (list (size self) (size self))
                              :element-type '(or null square)
                              :initial-element nil))
          (squares (shuffle (loop :for i :below (* (size self) (size self)) :collect i))))
      (declare (type (simple-array (or null square) (* *)) places))
      (loop :with size = (size self)
            :for i :from 0 :below size
            :do (loop :for j :from 0 :below size
                      :for square := (pop squares)
                      :if (zerop square)
                        :do (setf (empty self) (cons i j))
                      :else
                        :do (setf (aref places i j) (make-instance 'square :label square))))
      (setf (places self) places)
      self))
  
  
  (defmethod print-object ((self puzzle) (out stream))
  