    (reaction (:key @db))))
 
 
-(register-sub
- :attempts
- (fn
-   [db _]
-   (let [misses (reaction (:misses @db))]
-     (reaction (count @misses)))))
-
-
 (defn win-game?
   [word guesses]
   (= (set word) (set guesses)))
+
 (defn lose-game?
   [misses]
   (<= max-attempts (count misses)))

   [db _]
   (reaction (:misses @db))))


(register-sub
 :key
 (fn

        (if (end-game? @word @guesses @misses)
          :end 
          :play))))))
