 
 
 (defroutes app-routes
-  (GET "/" [] (get-board-atom))
+  (GET "/" {session :session} ;(get-board-atom)
+       (let [board (if (contains? session :board)
+                      (:board session)
+                      blank-board)]
+         (assoc (response/response (get-board board)) :session (assoc session :board board))))
+  (GET "/dump-session" {session :session} {:body (str "waaaaaa " session)
+                                           :session (assoc session :1 1)})
   (GET "/place-piece/:pos/:piece" [pos piece]
        (do
          (swap! board place-piece (keyword piece) (Integer/parseInt pos))

            [hiccup.form :as form]
            [hiccup.element :as element]
            [ring.util.response :as resp]
))

(def picture-map {:e "empty.png" :x "cross.png" :o "nought.png"})


(def app
  (-> app-routes
      (handler/site)
      (session/wrap-session)))

(defn make-server
  ([]
