 
     (and (= action :undo)
          (not (:won @state)))
-    (swap! state undo)))
+    (swap! state undo)
+
+    (= action :prev-level)
+    (swap! state try-seek-level -1)
+
+    (= action :next-level)
+    (swap! state try-seek-level 1)))
 
 (defn no-key-modifiers? [ev]
   (and

        (assoc :board (peek (:history state-value)))
        (update-in [:history] pop))
    state-value))

(def init-state
  (start-level {} yoshio-levels 0))

   37 :left
   39 :right
   82 :restart  ; XXX: not sure why (int \R) doesn't work?
   85 :undo
   78 :next-level
   80 :prev-level})

(def dirs #{:up :down :left :right})

