diff --git a/.gitignore b/.gitignore
index 9af00b0..0ee530d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,16 @@ libopenal64.so
.settings/
.classpath
-.project
\ No newline at end of file
+.project
+
+.calva/
+.lsp/
+
+
+*.so
+
+docs/cloverage/codecov.json
+
+docs/cloverage/coverage.xml
+
+src/cc/journeyman/the_great_game/cloverage.clj
diff --git a/docs/cloverage/cc/journeyman/the_great_game/buildings/module.clj.html b/docs/cloverage/cc/journeyman/the_great_game/buildings/module.clj.html
new file mode 100644
index 0000000..55ed3f9
--- /dev/null
+++ b/docs/cloverage/cc/journeyman/the_great_game/buildings/module.clj.html
@@ -0,0 +1,251 @@
+
+
+
+ cc/journeyman/the_great_game/buildings/module.clj
+
+
+
+ 001 (ns cc.journeyman.the-great-game.buildings.module
+
+
+ 002
+
+
+ 003 "A module of a building; essentially something like a portacabin, which can be
+
+
+ 004 assembled together with other modules to make a complete building.
+
+
+ 005
+
+
+ 006 Modules need to include
+
+
+ 007
+
+
+ 008 1. Ground floor modules, having external doors;
+
+
+ 009 2. Craft modules -- workshops -- which will normally be ground floor (except
+
+
+ 010 weavers) and may have the constraint that no upper floor module can cover them;
+
+
+ 011 3. Upper floor modules, having NO external doors (but linking internal doors);
+
+
+ 012 4. Roof modules
+
+
+ 013
+
+
+ 014 **Role** must be one of:
+
+
+ 015
+
+
+ 016 1. `:primary` a ground floor main entrance module
+
+
+ 017 2. `:secondary` a module which can be upper or ground floor
+
+
+ 018 3. `:upper` a module which can only be on an upper floor, for example one
+
+
+ 019 with a projecting gallery, balcony or overhang.
+
+
+ 020
+
+
+ 021 Other values for `role` will emerge.
+
+
+ 022
+
+
+ 023 **Exits** must be a sequence of keywords taken from the following list:
+
+
+ 024
+
+
+ 025 1. `:left` an exit in the centre of the left wall
+
+
+ 026 2. `:left-front` an exit in the centre of the left half of the front wall
+
+
+ 027 3. `:front` an exit in the centre of the front wall
+
+
+ 028 4. `:right-front` an exit in the centre of the right half of the front wall
+
+
+ 029 5. `:right` an exit in the centre of the right wall
+
+
+ 030 6. `:right-back` an exit in the centre of the right half of the back wall
+
+
+ 031 7. `:left-back` an exit in the centre of the back wall
+
+
+ 032
+
+
+ 033 A module placed on an upper floor must have no exit which opens beyond the
+
+
+ 034 footprint of the floor below - no doors into mid air! However, it is allowable
+
+
+ 035 (and indeed is necessary) to allow doors into roof spaces if the adjacent
+
+
+ 036 module on the same floor does not yet exist, since otherwise it would be
+
+
+ 037 impossible to access a new room which might later be built there.
+
+
+ 038
+
+
+ 039 **Load** must be a small integer indicating both the weight of the module and
+
+
+ 040 the total amount of weight it can support. So for example a stone-built module
+
+
+ 041 might have a `load` value of 4, a brick built one of 3, and a half-timbered one
+
+
+ 042 of 2, and a tent of 0. This means a stone ground floor module could support one
+
+
+ 043 further floor of stone or brick, or two further floors of half timbered
+
+
+ 044 construction; while a brick built ground floor could support a single brick or
+
+
+ 045 half-timbered upper floor but not a stone one, and a half-timbered ground floor
+
+
+ 046 could only support a half timbered upper floor.
+
+
+ 047
+
+
+ 048 There also needs to be an undercroft or platform module, such that the area of
+
+
+ 049 the top of the platform is identical with the footprint of the building, and
+
+
+ 050 the altitude of the top of the platform is equal to the altitude of the
+
+
+ 051 terrain at the heighest corner of the building; so that the actual
+
+
+ 052 building doesn't float in the air, and also so that none of the doors or windows
+
+
+ 053 are partly underground.
+
+
+ 054
+
+
+ 055 Each module needs to wrap an actual 3d model created in Blender or whatever,
+
+
+ 056 and have a list of optional **textures** with which that model can be rendered.
+
+
+ 057 So an upper floor bedroom module might have the following renders:
+
+
+ 058
+
+
+ 059 1. Bare masonry - constrained to upland or plateau terrain, and to coastal culture
+
+
+ 060 2. Painted masonry - constrained to upland or plateau terrain, and to coastal culture
+
+
+ 061 3. Half-timbered - not available on plateau terrain
+
+
+ 062 4. Weatherboarded - constrained to forest terrain
+
+
+ 063 5. Brick - constrained to arable or arid terrain
+
+
+ 064
+
+
+ 065 of course these are only examples, and also, it's entirely possible to have
+
+
+ 066 for example multiple different weatherboard renders for the same module.
+
+
+ 067 There needs to be a way of rendering what can be built above what: for
+
+
+ 068 example, you can't have a masonry clad module over a half timbered one,
+
+
+ 069 but you can have a half-timbered one over a masonry one.")
+
+
+ 070
+
+
+ 071 (defrecord BuildingModule
+
+
+ 072 [model
+
+
+ 073 ^Double length
+
+
+ 074 ^Double width
+
+
+ 075 ^Double height
+
+
+ 076 ^Integer load
+
+
+ 077 ^clojure.lang.Keyword role
+
+
+ 078 ^clojure.lang.IPersistentCollection textures
+
+
+ 079 ^clojure.lang.IPersistentCollection exits
+
+
+ 080 ]
+
+
+ 081 )
+
+
+
diff --git a/docs/cloverage/cc/journeyman/the_great_game/buildings/rectangular.clj.html b/docs/cloverage/cc/journeyman/the_great_game/buildings/rectangular.clj.html
index f276d7b..3ffd266 100644
--- a/docs/cloverage/cc/journeyman/the_great_game/buildings/rectangular.clj.html
+++ b/docs/cloverage/cc/journeyman/the_great_game/buildings/rectangular.clj.html
@@ -355,194 +355,104 @@
117
-
- 118 ;; TODO: So, modules need to contain
+
+ 118
+
+
+ 119 (defn building-family
- 119 ;;
+ 120 "A building family is essentially a collection of models of building modules
- 120 ;; 1. Ground floor modules, having external doors;
+ 121 which can be assembled to create buildings of a particular structural and
- 121 ;; 2. Craft modules -- workshops -- which will normally be ground floor (except
+ 122 architectural style."
- 122 ;; weavers) and may have the constraint that no upper floor module can cover them;
+ 123 [terrain culture craft gene]
+
+
+ 124 (let [candidates (filter #(and
+
+
+ 125 ((:terrains %) terrain)
+
+
+ 126 ((:crafts %) craft)
+
+
+ 127 ((:cultures %) culture))
+
+
+ 128 (vals *building-families*))]
+
+
+ 129 (nth candidates (mod (Math/abs (.nextInt gene)) (count candidates)))))
+
+
+ 130
+
+
+ 131 (building-family :arable :coastal :baker (MersenneTwister. 5))
+
+
+ 132
+
+
+ 133 (defn build!
- 123 ;; 3. Upper floor modules, having NO external doors (but linking internal doors);
+ 134 "Builds a building, and returns a data structure which represents it. In
- 124 ;; 4. Roof modules
+ 135 building the building, it adds a model of the building to the representation
- 125 ;;
+ 136 of the world, so it does have a side effect."
- 126 ;; There also needs to be an undercroft or platform module, such that the area of
+ 137 [holding terrain culture craft size]
+
+
+ 138 (if (satisfies? ProtoHolding holding)
+
+
+ 139 (let [location (.building-origin holding)
+
+
+ 140 gene (MersenneTwister. (int (+ (* (.easting location) 1000000) (.northing location))))
+
+
+ 141 family (building-family terrain culture craft gene)]
+
+
+ 142 (if
+
+
+ 143 (and (instance? ProtoLocation location) (:orientation location))
- 127 ;; the top of the platform is identical with the footprint of the building, and
+ 144 :stuff
- 128 ;; the altitude of the top of the platform is equal to the altitude of the
+ 145 :nonsense
- 129 ;; terrain at the heighest corner of the building; so that the actual
+ 146 ))
- 130 ;; building doesn't float in the air, and also so that none of the doors or windows
-
-
- 131 ;; are partly underground.
-
-
- 132 ;;
-
-
- 133 ;; Each module needs to wrap an actual 3d model created in Blender or whatever,
-
-
- 134 ;; and have a list of optional textures with which that model can be rendered.
-
-
- 135 ;; So an upper floor bedroom module might have the following renders:
-
-
- 136 ;;
-
-
- 137 ;; 1. Bare masonry - constrained to upland or plateau terrain, and to coastal culture
-
-
- 138 ;; 2. Painted masonry - constrained to upland or plateau terrain, and to coastal culture
-
-
- 139 ;; 3. Half-timbered - not available on plateau terrain
-
-
- 140 ;; 4. Weatherboarded - constrained to forest terrain
-
-
- 141 ;; 5. Brick - constrained to arable or arid terrain
-
-
- 142 ;;
-
-
- 143 ;; of course these are only examples, and also, it's entirely possible to have
-
-
- 144 ;; for example multiple different weatherboard renders for the same module.
-
-
- 145 ;; There needs to be a way of rendering what can be built above what: for
-
-
- 146 ;; example, you can't have a masonry clad module over a half timbered one,
-
-
- 147 ;; but you can have a half-timbered one over a masonry one
+ 147 :froboz))
148
-
- 149 (defn building-family
-
- 150 "A building family is essentially a collection of models of building modules
-
-
- 151 which can be assembled to create buildings of a particular structural and
-
-
- 152 architectural style."
-
-
- 153 [terrain culture craft gene]
-
-
- 154 (let [candidates (filter #(and
-
-
- 155 ((:terrains %) terrain)
-
-
- 156 ((:crafts %) craft)
-
-
- 157 ((:cultures %) culture))
-
-
- 158 (vals *building-families*))]
-
-
- 159 (nth candidates (mod (Math/abs (.nextInt gene)) (count candidates)))))
+ 149 ;; (def ol (cc.journeyman.the-great-game.location.location/OrientedLocation. 123.45 543.76 12.34 0.00 {}))
- 160
-
-
- 161 (building-family :arable :coastal :baker (MersenneTwister. 5))
-
-
- 162
-
-
- 163 (defn build!
-
-
- 164 "Builds a building, and returns a data structure which represents it. In
-
-
- 165 building the building, it adds a model of the building to the representation
-
-
- 166 of the world, so it does have a side effect."
-
-
- 167 [holding terrain culture craft size]
-
-
- 168 (if (satisfies? ProtoHolding holding)
-
-
- 169 (let [location (.building-origin holding)
-
-
- 170 gene (MersenneTwister. (int (+ (* (.easting location) 1000000) (.northing location))))
-
-
- 171 family (building-family terrain culture craft gene)]
-
-
- 172 (if
-
-
- 173 (and (instance? ProtoLocation location) (:orientation location))
-
-
- 174 :stuff
-
-
- 175 :nonsense
-
-
- 176 ))
-
-
- 177 :froboz))
-
-
- 178
-
-
- 179 ;; (def ol (cc.journeyman.the-great-game.location.location/OrientedLocation. 123.45 543.76 12.34 0.00 {}))
-
-
- 180
+ 150