src/caves/entities/core.clj @ a208f6298145

Add lichens!
author Steve Losh <steve@stevelosh.com>
date Thu, 12 Jul 2012 18:52:17 -0400
parents 9770861b040f
children b894c3ffe436
(ns caves.entities.core)


(def ids (ref 0))

(defprotocol Entity
  (tick [this world]
        "Update the world to handle the passing of a tick for this entity."))


(defn get-id []
  (dosync
    (let [id @ids]
      (alter ids inc)
      id)))