         ]
     (when debug
       (println "in checkmated?")
-        (println (moves board color)))
+      (println (moves board color)))
     (some #(when (= (second %) king-location) true) (moves board color))
 
     ))
 
 ;;;;;;;;;;;;;; TESTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defn test-rook-captures2[]
-  (is (= 
-       #{[[1 0] [0 0]]} 
-        (rook-captures (string->board (str "BR\n"
-                                           "kR")) [1 0])))
-  )
-;; (test-rook-captures2)
-(defn test-rook-moves[]
-  (let [board (string->board (join "\n" 
-                                   ["  "
-                                    " R"
-                                    "  "]))
-        ]
-    (println (rook-non-captures board [1 1])))
-  )
+(defn test-moves[]
+  (println "test-moves")
+  (moves (string->board "R") :white)
+  )
+;; (println (test-moves))
 (defn test-checkmated[]
   ;; white checkmates black
   (assert (not (checkmated? (string->board "BR\nkR") :white)))
-  (assert (checkmated? (string->board "BR\n k") :white))
+  (assert (checkmated? (string->board (str "BR\n"
+                                           " k")) :white))
   )
 ;; (test-checkmated)
 (defn test-starting-moves[]


(defn bishop-sw[x y z] [ (- x z) (- y z)])

(def bishop-rules [bishop-ne bishop-nw bishop-se bishop-sw])
(def rook-rules [rook-right rook-left rook-up rook-down])


(def is-ranging? #{"q" "Q" "b" "B" "r" "R"})



(defn ranging-captures[board location rules]
  {:pre  []
   }
  "return set of locations for captures that the rook or bishop at location can make"
  (when true (println "entering ranging-captures"))
  (assert (is-ranging? (get board location)))
  (assert (is-board? board))
  (assert (valid-location? location))
  (let [color (get-color (get board location))
        [x y] location
        ]
    (map (fn[loc2] (vector location loc2))
         (remove nil?
      (map (fn[loc-to-capture] (vector location loc-to-capture))
           (remove nil?
                   (map
                     (partial ranging-capture-in-direction board location)
                     rules 
                     )))))))


;; z will range from 1 to infinity


(defn ranging-non-capture-in-direction[board location direction-fn]
  ;; location is the location of the friendly piece in question 
  ;; direction-fn generate locations to test using a function applied to the range 1..infinity
  ;; Finished when 
