            accum []
            ]
       (let [loc-to-test (first locs-to-test)]
-        (when false
+        (when debug 
           (println "processing " loc-to-test))
         (cond 
           (off-board? loc-to-test)

  (let [
        op (if (= :white (:player-to-move position)) inc dec) 
        ]
  "return valid capture locations for the pawn at given location"
    (keep 
      (fn[dec-or-inc]
        (if (unoccupied? position [(dec-or-inc x) (op y)])

;;;;;;;;;;;;;; TESTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn string->position-and-print[x y]
  (let [position (string->position x y)]
    (println (position->string position))
    position))

;; (test-king-cannot-move-to-a-location-under-attack)
;; (locations-under-attack (string->position-and-print "bbn\n\nK" :white))
(defn test-king-cannot-move-to-a-location-under-attack[]
  (is (= []
         (moves (string->position "bbn\n\nK" :white)))))

(defn test-king-moves[]
  (is (= '([[0 0] [1 1]] [[0 0] [1 0]] [[0 0] [0 1]])
         (moves (string->position "k" :black)))
      )
  (is (= 
         '([[0 0] [1 1]] [[0 0] [1 0]] [[0 0] [0 1]])
         (moves (string->position "kN" :black))))
  )
(defn test-non-ranging-moves[]
