           (count))))
 
 (defn complete-game [game]
+  (.ga  js/window 'send', 'event', 'win-game', 'click')
   (play-sound :completed)
   (-> game
       (assoc-in [:end] :completed)))
 
 (defn fail-game [game]
+  (.ga  js/window 'send', 'event', 'fail-game', 'click')
   (play-sound :failed)
   (-> game
       (assoc-in [:end] :failed)))

;;      (println "Changed seconds")
      (set-tick))))


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


(def setting (r/atom { :difficulty :beginner}))


    (and end? (= state :flag) (zero? mine)) "wrong_flag"
    (= state :open)                         (str "open_" surround " open")
    (= state :flag)                         "cell_flag"
    end?                                    (str "cell_" (name state)) ;;disable actions
    :else                                   (str "cell_action cell_" (name state)) ))
(defn text-of [end? mine state surround]
  (cond 
