This commit is contained in:
Akko
2024-04-19 14:50:26 +02:00
parent 199c286de0
commit 79fcadf89b
41 changed files with 942 additions and 176 deletions

View File

@@ -0,0 +1,8 @@
(ns sekai.event.queue
(:require [sekai.core.gamestate :refer [game-state]]))
(defn next-tick []
(-> @game-state :tick inc))
(defn enqueue! [event tick]
(swap! game-state update-in [:queue (max tick (next-tick))] (fnil conj []) event))