Rearrange data declarations
author |
Steve Losh <steve@stevelosh.com> |
date |
Thu, 21 Jul 2011 20:26:02 -0400 |
parents |
ec310473df43
|
children |
86070faebacf
|
branches/tags |
(none) |
files |
src/clojurecraft/data.clj |
Changes
--- a/src/clojurecraft/data.clj Thu Jul 21 20:24:43 2011 -0400
+++ b/src/clojurecraft/data.clj Thu Jul 21 20:26:02 2011 -0400
@@ -29,14 +29,6 @@
; without modifying it).
(defrecord Entity [eid loc despawned])
-; Chunk
-;
-; A single chunk in the world.
-;
-; blocks -> [block ...]
-; A vector of the blocks in this chunk.
-(defrecord Chunk [blocks])
-
; Block
;
; A representation of a single block.
@@ -48,6 +40,30 @@
; kind -> TODO
(defrecord Block [loc kind])
+; Chunk
+;
+; A single chunk in the world.
+;
+; blocks -> [block ...]
+; A vector of the blocks in this chunk.
+(defrecord Chunk [blocks])
+
+; World
+;
+; A representation of a single world/server, shared by all bots connected to it.
+;
+; server -> {:name hostname :port port}
+;
+; entities -> (ref {eid (ref Entity) ...})
+; A map of all the entities in the world.
+;
+; chunks -> (ref {[x y z] [(ref Chunk) ...] ...})
+; A map of all the chunks in the world.
+;
+; time -> (ref integer)
+; The current world time.
+(defrecord World [server entities chunks time])
+
; Bot
;
; A single bot, connected to a server.
@@ -83,19 +99,3 @@
(defrecord Bot [connection outqueue player world
packet-counts-in packet-counts-out])
-; World
-;
-; A representation of a single world/server, shared by all bots connected to it.
-;
-; server -> {:name hostname :port port}
-;
-; entities -> (ref {eid (ref Entity) ...})
-; A map of all the entities in the world.
-;
-; chunks -> (ref {[x y z] [(ref Chunk) ...] ...})
-; A map of all the chunks in the world.
-;
-; time -> (ref integer)
-; The current world time.
-(defrecord World [server entities chunks time])
-