...
 
Commits (3)
......@@ -3,16 +3,17 @@
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.671"]
[reagent "0.7.0"]
[re-frame "0.10.5"]]
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.439"]
[reagent "0.8.1"]
[re-frame "0.10.6"]]
:plugins [[lein-cljsbuild "1.1.7"]]
:source-paths ["src/clj" "src/cljs" "src/cljc"]
:resource-paths ["resources"]
:figwheel {:css-dirs ["resources/public/css"]}
:figwheel {:css-dirs ["resources/public/css"]
:server-port 3450}
:profiles {:dev {:dependencies [[binaryage/devtools "0.9.10"]]
:plugins [[lein-figwheel "0.5.16"]]}
......
......@@ -31,14 +31,14 @@
[:p {:class "control"}
[:input {:class "input"
:type "Number"
:min 1
:min 2
:value (:size @(re-frame/subscribe [:app-state]))
:on-change #(re-frame/dispatch [::events/update-size! (-> % .-target .-value js/parseInt)])}]]]
[:div {:class "field"}
[:a {:class "button is-primary"
:on-click #(re-frame/dispatch [::events/reset-game!])}
"Reset"]]]]
(when (> (:size app-state) 2)
(when (>= (:size app-state) 2)
(let [fitness (b/board-fitness app-state)]
[:div {:class "has-text-centered"}
[:span {:class "is-clearfix"} fitness]]))
......@@ -46,7 +46,7 @@
(defn board []
(let [{:keys [size cells]} @(re-frame/subscribe [:app-state])]
(when (> size 2)
(when (>= size 2)
[:div
[:div {:class "board-controls"}
[:div {:class "play-board"}
......