anchor.diff:  ; this method returns whether the game is won
   (defmethod wonp ((this board-widget))
     (let ((won nil))
  -    (loop for i from 0 to 3 do
  -      (loop for j from 0 to 3 do
  -        (when (= (value (index (board this) i j)) 2048)
  -          (setf won t))))
  +    (board-loop
  +      (when (= (bval row col) 2048)
  +        (setf won t)))
       won))
   
   ; this method checks for loss and win, and updates accordingly
  
positive.code: ; this method checks if the board is full
  (defmethod fullp ((this board-widget))
    (let ((full t))
      (loop for row from 0 to 3 do
        (loop for col from 0 to 3 do
          (when (= (value (index (board this) row col)) 0)
            (setf full nil))))
      full))
  
  ; this method adds a random 2 or 4 cell into an empty space
  (defmethod add-random ((this board-widget))
    (when (not (fullp this))
      (let ((row (random 4)) (col (random 4)))
        (if (= (value (index (board this) row col)) 0)
          (setf (value (nth col (nth row (board this)))) (if (= (random 2) 0) 2 4))
          (add-random this)))))
  
  ; this method returns whether the game is lost TODO this fails because of 3
  (defmethod lostp ((this board-widget))
    ; assume that we did lose
    (let ((lost t))
      ; check the verticals
      (loop for i from 0 to 3 do
        (loop for j from 0 to 2 do
          (when (= (value (index (board this) i j)) (value (index (board this) i (+ j 1))))
            (setf lost nil))))
      ; check the horizontals
      (loop for i from 0 to 2 do
        (loop for j from 0 to 3 do
          (when (= (value (index (board this) i j)) (value (index (board this) (+ i 1) j)))
            (setf lost nil))))
      ; check for zeroes
      (when (not (fullp this))
  
negative.code:   (:qt-superclass "QWidget")
    (:override ("keyPressEvent" key-press-event)))
  
  ; a macro for looping over the board
  (defmacro board-loop (&rest body)
    `(loop for row from 0 to 3 do
      (loop for col from 0 to 3 do
        (progn ,@body))))
  
  ; a macro for getting a board value
  (defmacro bval (r c)
    `(value (index (board this) ,r ,c)))
  
  ; method to update the widget
  (defmethod update-board ((this board-widget))
    (board-loop
      (#_update (index (board this) row col))))
  
  ; these methods each move the board in a specific direction
  ; they return whether or not they made any change at all
  