Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEbbinghaus committed Jan 21, 2025
1 parent 8b6f8e5 commit 15a854e
Show file tree
Hide file tree
Showing 6 changed files with 1,676 additions and 670 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@ figwheel_server.log

/resources/public/js/
/.clj-kondo/.cache/
/.clj-kondo/imports/
/.lsp/.cache
/.cpcache
/.shadow-cljs
/node_modules
yarn-error.log
yarn-error.log

.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
13 changes: 6 additions & 7 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{:paths ["src"]

:deps
{org.clojure/clojure {:mvn/version "1.11.1"}
quil/quil {:mvn/version "3.1.0"}
thi.ng/geom {:mvn/version "0.0.1062"}
com.taoensso/tufte {:mvn/version "2.2.0"}}
{org.clojure/clojure {:mvn/version "1.12.0"}
quil/quil {:mvn/version "4.3.1563"}
thi.ng/geom {:mvn/version "1.0.1"}
com.taoensso/tufte {:mvn/version "2.6.3"}}

:aliases
{:cljs
{:extra-deps
{org.clojure/clojurescript {:mvn/version "1.11.60"}
thheller/shadow-cljsjs {:mvn/version "0.0.22"}}}
{org.clojure/clojurescript {:mvn/version "1.11.132"}}}

:dev
{:extra-paths ["dev"]
:extra-deps
{thheller/shadow-cljs {:mvn/version "2.19.5"}}
{thheller/shadow-cljs {:mvn/version "2.28.20"}}
:main-opts ["-m" "shadow.cljs.devtools.cli"]}}}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"homepage": "https://mrebbinghaus.github.io/Biosphere/",
"repository": "github:MrEbbinghaus/Biosphere",
"dependencies": {
"p5": "^1.4.1"
"p5": "^1.7.0"
},
"devDependencies": {
"shadow-cljs": "^2.19.5"
}
"shadow-cljs": "^2.28.20"
},
"packageManager": "yarn@4.6.0"
}
8 changes: 1 addition & 7 deletions src/biosphere/creature.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,11 @@
(tick-on-water state)
move))))

(defn- map-vals [m f]
(persistent!
(reduce-kv (fn [acc k v] (assoc! acc k (f v)))
(transient m)
m)))

(defn update-creatures [state]
(tufte/profile {:id :update-creatures}
(let [thoughtful-creatures (mapv #(think state %) (-> state :creatures vals))
new-state (reduce profile-execute state thoughtful-creatures)]
(update new-state :creatures map-vals tick-internals new-state))))
(update new-state :creatures update-vals #(tick-internals % new-state)))))

(defn init-creatures [{:keys [width height no-of-creatures speed] :as state}]
(let [new-creatures
Expand Down
Loading

0 comments on commit 15a854e

Please sign in to comment.