step.clj

Branches > main > 41eb671 > files / src / net / bowmap / server / step.clj

(ns net.bowmap.server.step)

; Where is this called, who's controlling this loop?
(defn step [model fact] ; -> [model [effects]]
  (case (:id model)
    :status-requested ; Effect status response which eventually sends out packets to the client
    (let [{:keys! [client]} fact]
      [model
       [{:effect/id :send-status-response
         :client client
         :player-count (or (:player-count model) 0)
         :version "1.21.11"
         :protocol 774}]])
    [model []]))