     :else :in-progress)))
 
 (defn computer-move [board]
-  (let [move (rand-nth (free-spots board))]
+  (let [move (or 
+              (not-empty (free-spot board  (first (threat-lines board)))) 
+              (rand-nth (free-spots board)))]
     (assoc-in board move "O")))
-
-(defn block-attempt [board]
-  ())
 
 (defn blank [i j]
       [:rect {:width 0.95

  (for [i (range board-size)] [i (- (dec board-size) i)]))

(defn all-lines-coords []
  (concat  [(diagonal-down board) (diagonal-up board)]
    (for [i (range board-size)] (horizontal board i))
    (for [i (range board-size)] (vertical board i))))

(defn winning-by? [player line]
  (every? #(= % player) (take winning-k line)))

(defn winning? [board player]
  (some (partial winning-by? player) (all-lines board) ))

(defn game-status []
  (let [board (:board @app-state)]

(defn draw? [board]
  (empty? (free-spots board)))

(defn vertical-coords [y]
  (map #(vector % y) (range board-size)))

