 
 (defn update-timer []
   (let [game @game-state]
-;;    (println "timer triggered")
     (when-not (or (game :first) (game :end))
-;;      (println "Changed seconds")
       (set-tick))))
 
 (defn stop-sound [] (when-let [ audio-obj @playing] (.pause audio-obj)))

   :first true
   :start 0 ;;timestamp
   :remains 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')

(ns minesweeper.core
  (:require [clojure.string :as string]
            [reagent.core :as r]))

(enable-console-print!)

