anchor.diff:    ; assume no change, set to true on change
     (let ((change nil))
       ; for each row
  -    (loop for i from 0 to 3 do
  +    (loop for row from 0 to 3 do
         ; for each column
  -      (loop for j from 0 to 3 do
  +      (loop for col from 0 to 3 do
           ; when this cell is not zero
  -        (when (/= (value (index (board this) i j)) 0)
  +        (when (/= (bval row col) 0)
             ; for each cell from here to 1
  -          (loop for k from j downto 1 do
  +          (loop for k from col downto 1 do
               ; if it can move to the right
  -            (when (= (value (index (board this) i (- j k))) 0)
  +            (when (= (bval row (- col k)) 0)
                 ; move it
  -              (setf (value (index (board this) i (- j k))) (value (index (board this) i j)))
  -              (setf (value (index (board this) i j)) 0)
  +              (setf (bval row (- col k)) (bval row col))
  +              (setf (bval row col) 0)
                 (setf change t)))))
         ; for each column
  -      (loop for j from 0 to 3 do
  +      (loop for col from 0 to 3 do
           ; if it can be combined
  -        (when (and (< (+ j 1) 4) (= (value (index (board this) i j)) (value (index (board this) i (+ j 1)))))
  +        (when (and (< (+ col 1) 4) (= (bval row col) (bval row (+ col 1))))
             ; combine it
  -          (setf (value (index (board this) i j)) (* (value (index (board this) i j)) 2))
  -          (setf (value (index (board this) i (+ j 1))) 0)
  -          (when (/= (value (index (board this) i j)) 0)
  +          (setf (bval row col) (* (bval row col) 2))
  +          (setf (bval row (+ col 1)) 0)
  +          (when (/= (bval row col) 0)
               (setf change t))))
         ; check again to see if we can move things to the left
  -      (loop for j from 0 to 3 do
  -        (when (/= (value (index (board this) i j)) 0)
  -          (loop for k from j downto 1 do
  -            (when (= (value (index (board this) i (- j k))) 0)
  -              (setf (value (index (board this) i (- j k))) (value (index (board this) i j)))
  -              (setf (value (index (board this) i j)) 0)
  +      (loop for col from 0 to 3 do
  +        (when (/= (bval row col) 0)
  +          (loop for k from col downto 1 do
  +            (when (= (bval row (- col k)) 0)
  +              (setf (bval row (- col k)) (bval row col))
  +              (setf (bval row col) 0)
                 (setf change t))))))
       ; whether there was any change
       change))
  
positive.code:         ((= (#_key event) (enum-value (#_Qt::Key_Right))) (right this))
          ((= (#_key event) (enum-value (#_Qt::Key_Down))) (down this))
          (t nil))
      (add-random this)
      (update-board this)
      (check-end this)))
          
  
negative.code:     (when reset
        (loop for row from 0 to 3 do
          (loop for col from 0 to 3 do
            (setf (bval row col) 0)))
        (add-random this 2))
      (when quit
        (#_QCoreApplication::exit 0))))
    
  