    :first true
    :start 0 ;;timestamp
    :remains mines
+   :need-open (- (* x y) mines)
    }))
 
-(defn all-open? [game]
-  (= (->> (game :board)
-          (apply concat)
-          (filter #(not= 1 %))
-          (count))
-     (->> (game :states)
-          (apply concat)
-          (filter #(= :open %))
-          (count))))
 
 (defn complete-game [game]
   (.ga  js/window 'send', 'event', 'win-game', 'click')

    (swap-cell game [x y] (find-space game))
    game))


(defn click-game [game x y]
  (let [game (if (game :first) 
               (-> game


(defn update-timer []
  (let [game @game-state]
    (when-not (or (game :first) (game :end))
      (set-tick))))

(defn stop-sound [] (when-let [ audio-obj @playing] (.pause audio-obj)))
