     (some has-sides-connected? (filter has-all-sides? players-fields))))
 
 (defn normalize-answer
+  "Normalize answer to enable non-exact matching."
   [answer]
   (-> answer
       replace-diacritics
-      string/lower-case))
+      string/lower-case
+      string/trim))
 
 (defn answer-matches?
   "Test if guess matches the exepcted answer using Jaro-Winkler's string distance.

                                                (fn [app-state] (assoc app-state :current-field id))))
                :missed (do (test-winner on-turn id)
                            (swap! app-state (comp toggle-player 
                                                   deselect-current-field)))))))

(defonce timeout-updater
  (js/setInterval (fn []

(defn test-winner
  [owner current-field]
  (let [state (swap! app-state (partial change-ownership owner current-field))
        winner (find-winner (:board state))
        mark-fn (partial match-answer true)]
    (when winner
      (go (swap! app-state (comp mark-fn #(assoc % :winner winner)))
          (<! (timeout verdict-display-time))
          (swap! app-state (comp clear-answer deselect-current-field unmatch-answer))
          (redirect "#end")))))

(defn turn
  [& {:keys [answer answer-matched? correct-answer]}]
  (let [mark-fn (partial match-answer answer-matched?)
        keypresses (listen js/window.document "keydown")]
    (go (swap! app-state mark-fn)
        (alts! [keypresses (timeout verdict-display-time)])
        (close! keypresses)
        (swap! app-state (comp restart-timer toggle-player clear-answer
                               deselect-current-field unmatch-answer))))) 

