               (ranging-moves position loc (:rules piece-info)) 
               (is-pawn? piece)
               (pawn-moves position loc) 
-             (is-knight? piece) 
+              (is-knight? piece) 
               (non-ranging-moves position loc (:rules piece-info)) 
-             (is-king? piece) 
-              (remove (fn[move] (contains? (:locations-under-attack position)
-                                           (second move)))
-              (non-ranging-moves position loc (:rules piece-info))) 
+              (is-king? piece) 
+              (:king-moves position)
               true
               (assert false)
               ))) 

  )

(defn unoccupied?[position location]
   (not (occupied? position location)))

(defn num->alpha[x]
  (assert number? x)

   :pre [(my-is-a? :position position)] }

  (let [enemy-position (flip-position position)]
   (when debug (println "enemy-position" enemy-position))
    (set (map second (moves enemy-position)))))
        ;; (filter (partial unoccupied? enemy-position)
                ;; (map second (locations-under-attack-moves enemy-position))))



