entity.clj
Branches > facts > 0b339d9 > files / src / net / bowmap / server / entity.clj
(ns net.bowmap.server.entity
(:require
[clojure.spec.alpha :as s]))
; A unique ephemeral ID for this entity, used in the protocol
(s/def ::id pos-int?)
(s/def ::uuid uuid?)
(defonce highest-entity-id (ref 0))
(defn next-entity-id! []
(dosync (commute highest-entity-id inc)))