anchor.diff:               (or (null promotion)
                    (can-promote-p piece final-rank whitep))
                (valid-check-sign-p check move board whitep))))))
  +
  +(defun valid-move-p (move board whitep)
  +  "Determines if a move can legally be performed on a given board."
  +  (if (castling-move-p move)
  +      (valid-castle-move-p move board whitep)
  +      (valid-single-piece-move-p move board whitep)))
   
   (defun move-from-to (board initial-file initial-rank final-file final-rank
                        &key new-piece)
  
positive.code:   "([RNBQK])?([a-h])?([1-8])?(x)?([a-h])([1-8])(=[RNBQK])?([#+])?"
    "A regular expression that describes chess movement in standard
     algebraic notation")
  
  (defconstant +piece-chars+ '(#\R #\N #\B #\Q #\K #\P))
  
  
negative.code:                              capture-sign files ranks check-sign)
                      (product files ranks capture-sign
                               '("" "=R" "=N" "=B" "=Q" "=K")
                               check-sign)
                      (product '("0-0" "0-0-0") check-sign))))
    "A list of all possible string algebraic notation moves.")
  
  (defun product (&rest lists)
    "Calculates the Cartesian product of the input lists."
  