        (map-indexed vector) 
        (keep #(cond (nil? (second %)) (first %)))))
 
-
-(defn lines []
-  "All possible winning lines"
-  [[0 1 2] ;; horizontal
-   [3 4 5]
-   [6 7 8]
-
-   [0 3 6] ;; vertical
-   [1 4 7]
-   [2 5 8]
-
-   [0 4 8] ;; diagonal
-   [2 4 6]])
 
 (defn fitness [game]
   "Calculates the fitness of a particular game state"

(defn legal-move? [game move]
  "Is move legal in this game?"
  (not (get (:tiles game) move)))

(defn successor [game move]
  {:pre [(not (game-over? game)) (legal-move? game move)]}

         ;; Add up total score for the board
         (reduce +))))


