Much work on tidying documentation, not yet complete.
This commit is contained in:
parent
7e7a55c8ec
commit
3fcf16e079
43 changed files with 1233 additions and 267 deletions
|
|
@ -38,24 +38,24 @@
|
|||
style="width:87.17948717948718%;
|
||||
float:left;"> 34 </div></td>
|
||||
<td class="with-number">12.82 %</td>
|
||||
<td class="with-number">65</td><td class="with-number">5</td><td class="with-number">39</td>
|
||||
<td class="with-number">66</td><td class="with-number">5</td><td class="with-number">39</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="the_great_game/gossip/news_items.clj.html">the-great-game.gossip.news-items</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:89.34108527131782%;
|
||||
float:left;"> 461 </div><div class="not-covered"
|
||||
style="width:10.65891472868217%;
|
||||
float:left;"> 55 </div></td>
|
||||
<td class="with-number">89.34 %</td>
|
||||
style="width:92.73422562141491%;
|
||||
float:left;"> 485 </div><div class="not-covered"
|
||||
style="width:7.265774378585086%;
|
||||
float:left;"> 38 </div></td>
|
||||
<td class="with-number">92.73 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:83.65384615384616%;
|
||||
float:left;"> 87 </div><div class="partial"
|
||||
style="width:87.5%;
|
||||
float:left;"> 91 </div><div class="partial"
|
||||
style="width:8.653846153846153%;
|
||||
float:left;"> 9 </div><div class="not-covered"
|
||||
style="width:7.6923076923076925%;
|
||||
float:left;"> 8 </div></td>
|
||||
<td class="with-number">92.31 %</td>
|
||||
<td class="with-number">244</td><td class="with-number">29</td><td class="with-number">104</td>
|
||||
style="width:3.8461538461538463%;
|
||||
float:left;"> 4 </div></td>
|
||||
<td class="with-number">96.15 %</td>
|
||||
<td class="with-number">246</td><td class="with-number">30</td><td class="with-number">104</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="the_great_game/merchants/markets.clj.html">the-great-game.merchants.markets</a></td><td class="with-bar"><div class="covered"
|
||||
|
|
@ -140,19 +140,17 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="the_great_game/time.clj.html">the-great-game.time</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:98.10606060606061%;
|
||||
float:left;"> 259 </div><div class="not-covered"
|
||||
style="width:1.893939393939394%;
|
||||
float:left;"> 5 </div></td>
|
||||
<td class="with-number">98.11 %</td>
|
||||
style="width:99.62121212121212%;
|
||||
float:left;"> 263 </div><div class="not-covered"
|
||||
style="width:0.3787878787878788%;
|
||||
float:left;"> 1 </div></td>
|
||||
<td class="with-number">99.62 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:96.66666666666667%;
|
||||
float:left;"> 58 </div><div class="partial"
|
||||
style="width:1.6666666666666667%;
|
||||
float:left;"> 1 </div><div class="not-covered"
|
||||
style="width:98.33333333333333%;
|
||||
float:left;"> 59 </div><div class="partial"
|
||||
style="width:1.6666666666666667%;
|
||||
float:left;"> 1 </div></td>
|
||||
<td class="with-number">98.33 %</td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">144</td><td class="with-number">21</td><td class="with-number">60</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -230,9 +228,9 @@
|
|||
</tr>
|
||||
<tr><td>Totals:</td>
|
||||
<td class="with-bar"></td>
|
||||
<td class="with-number">66.14 %</td>
|
||||
<td class="with-number">66.88 %</td>
|
||||
<td class="with-bar"></td>
|
||||
<td class="with-number">67.89 %</td>
|
||||
<td class="with-number">68.59 %</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -11,193 +11,196 @@
|
|||
002 "Interchange of news events between gossip agents"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 (:require [the-great-game.utils :refer [deep-merge]]))
|
||||
003 (:require [the-great-game.utils :refer [deep-merge]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 [the-great-game.gossip.news-items :refer [learn-news-item]]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
004
|
||||
005
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 ;; Note that habitual travellers are all gossip agents; specifically, at this
|
||||
006 ;; Note that habitual travellers are all gossip agents; specifically, at this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 ;; stage, that means merchants. When merchants are moved we also need to
|
||||
007 ;; stage, that means merchants. When merchants are moved we also need to
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 ;; update the location of the gossip with the same key.
|
||||
008 ;; update the location of the gossip with the same key.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
008
|
||||
009
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
009 (defn dialogue
|
||||
010 (defn dialogue
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 "Dialogue between an `enquirer` and an `agent` in this `world`; returns a
|
||||
011 "Dialogue between an `enquirer` and an `agent` in this `world`; returns a
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 map identical to `enquirer` except that its `:gossip` collection may have
|
||||
012 map identical to `enquirer` except that its `:gossip` collection may have
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 additional entries."
|
||||
013 additional entries."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
013 ;; TODO: not yet written, this is a stub.
|
||||
014 ;; TODO: not yet written, this is a stub.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
014 [enquirer respondent world]
|
||||
015 [enquirer respondent world]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
015 enquirer)
|
||||
016 enquirer)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
016
|
||||
017
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
017 (defn gather-news
|
||||
018 (defn gather-news
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
018 ([world]
|
||||
019 ([world]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
019 (reduce
|
||||
020 (reduce
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
020 deep-merge
|
||||
021 deep-merge
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
021 world
|
||||
022 world
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
022 (map
|
||||
023 (map
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
023 #(gather-news world %)
|
||||
024 #(gather-news world %)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
024 (keys (:gossips world)))))
|
||||
025 (keys (:gossips world)))))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
025 ([world gossip]
|
||||
026 ([world gossip]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 7 forms covered">
|
||||
026 (let [g (cond (keyword? gossip)
|
||||
027 (let [g (cond (keyword? gossip)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
027 (-> world :gossips gossip)
|
||||
028 (-> world :gossips gossip)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
028 (map? gossip)
|
||||
029 (map? gossip)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
029 gossip)]
|
||||
030 gossip)]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
030 {:gossips
|
||||
031 {:gossips
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
031 {(:id g)
|
||||
032 {(:id g)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
032 (reduce
|
||||
033 (reduce
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
033 deep-merge
|
||||
034 deep-merge
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
034 {}
|
||||
035 {}
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
035 (map
|
||||
036 (map
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
036 #(dialogue g % world)
|
||||
037 #(dialogue g % world)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
037 (remove
|
||||
038 (remove
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
038 #( = g %)
|
||||
039 #( = g %)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
039 (filter
|
||||
040 (filter
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
040 #(= (:location %) (:location g))
|
||||
041 #(= (:location %) (:location g))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
041 (vals (:gossips world))))))}})))
|
||||
042 (vals (:gossips world))))))}})))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
042
|
||||
043
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
043 (defn move-gossip
|
||||
044 (defn move-gossip
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
044 "Return a world like this `world` but with this `gossip` moved to this
|
||||
045 "Return a world like this `world` but with this `gossip` moved to this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
045 `new-location`. Many gossips are essentially shadow-records of agents of
|
||||
046 `new-location`. Many gossips are essentially shadow-records of agents of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
046 other types, and the movement of the gossip should be controlled by the
|
||||
047 other types, and the movement of the gossip should be controlled by the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 run function of the type of the record they shadow. The [[#run]] function
|
||||
048 run function of the type of the record they shadow. The [[#run]] function
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 below does NOT call this function."
|
||||
049 below does NOT call this function."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 [gossip world new-location]
|
||||
050 [gossip world new-location]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
050 (let [id (cond
|
||||
051 (let [id (cond
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
051 (map? gossip)
|
||||
052 (map? gossip)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 7 forms covered">
|
||||
052 (-> world :gossips gossip :id)
|
||||
053 (-> world :gossips gossip :id)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
053 (keyword? gossip)
|
||||
054 (keyword? gossip)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
054 gossip)]
|
||||
055 gossip)]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
055 (deep-merge
|
||||
056 (deep-merge
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
056 world
|
||||
057 world
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
057 {:gossips
|
||||
058 {:gossips
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 2 forms covered">
|
||||
058 {id
|
||||
059 {id
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
059 {:location new-location}}})))
|
||||
060 {:location new-location}}})))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
060
|
||||
061
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
061 (defn run
|
||||
062 (defn run
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
062 "Return a world like this `world`, with news items exchanged between gossip
|
||||
063 "Return a world like this `world`, with news items exchanged between gossip
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
063 agents."
|
||||
064 agents."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
064 [world]
|
||||
065 [world]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
065 (gather-news world))
|
||||
066 (gather-news world))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
003 (:require [the-great-game.world.location :refer [distance-between]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 [the-great-game.time :refer [now]]))
|
||||
004 [the-great-game.time :refer [game-time]]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
005
|
||||
|
|
@ -418,323 +418,329 @@
|
|||
<span class="covered" title="10 out of 10 forms covered">
|
||||
138 #(some (fn [x] (= x location)) (:location %))
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
139 (:knowledge gossip)))))
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
139 (cons {:location (:home gossip)} (:knowledge gossip))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
140
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
141 ;; (interest-in-location {:home [{0, 0} :test-home] :knowledge []} [:test-home])
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
142
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
141 (defn interesting-location?
|
||||
143 (defn interesting-location?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
142 "True if the location of this news `item` is interesting to this `gossip`."
|
||||
144 "True if the location of this news `item` is interesting to this `gossip`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
143 [gossip item]
|
||||
145 [gossip item]
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
144 (> (interest-in-location gossip (:location item)) 1))
|
||||
146 (> (interest-in-location gossip (:location item)) 0))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
145
|
||||
147
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
146 (defn interesting-object?
|
||||
148 (defn interesting-object?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
147 [gossip object]
|
||||
149 [gossip object]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
148 ;; TODO: Not yet (really) implemented
|
||||
150 ;; TODO: Not yet (really) implemented
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
149 true)
|
||||
151 true)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
150
|
||||
152
|
||||
</span><br/>
|
||||
<span class="partial" title="1 out of 2 forms covered">
|
||||
151 (defn interesting-topic?
|
||||
153 (defn interesting-topic?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
152 [gossip topic]
|
||||
154 [gossip topic]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
153 ;; TODO: Not yet (really) implemented
|
||||
155 ;; TODO: Not yet (really) implemented
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
154 true)
|
||||
156 true)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
155
|
||||
157
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
156 (defn interesting-item?
|
||||
158 (defn interesting-item?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
157 "True if anything about this news `item` is interesting to this `gossip`."
|
||||
159 "True if anything about this news `item` is interesting to this `gossip`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
158 [gossip item]
|
||||
160 [gossip item]
|
||||
</span><br/>
|
||||
<span class="partial" title="13 out of 17 forms covered">
|
||||
159 (or
|
||||
161 (or
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
160 (interesting-character? gossip (:actor item))
|
||||
162 (interesting-character? gossip (:actor item))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
161 (interesting-character? gossip (:other item))
|
||||
163 (interesting-character? gossip (:other item))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
162 (interesting-location? gossip (:location item))
|
||||
164 (interesting-location? gossip (:location item))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
163 (interesting-object? gossip (:object item))
|
||||
165 (interesting-object? gossip (:object item))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
164 (interesting-topic? gossip (:verb item))))
|
||||
166 (interesting-topic? gossip (:verb item))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
165
|
||||
167
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
166 (defn infer
|
||||
168 (defn infer
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
167 "Infer a new knowledge item from this `item`, following this `rule`"
|
||||
169 "Infer a new knowledge item from this `item`, following this `rule`"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
168 [item rule]
|
||||
170 [item rule]
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
169 (reduce merge
|
||||
171 (reduce merge
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
170 item
|
||||
172 item
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
171 (cons
|
||||
173 (cons
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
172 {:verb (:verb rule)}
|
||||
174 {:verb (:verb rule)}
|
||||
</span><br/>
|
||||
<span class="covered" title="13 out of 13 forms covered">
|
||||
173 (map (fn [k] {k (apply (k rule) (list item))})
|
||||
175 (map (fn [k] {k (apply (k rule) (list item))})
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
174 (remove
|
||||
176 (remove
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
175 #(= % :verb)
|
||||
177 #(= % :verb)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
176 (keys rule))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
177
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
178 (declare learn-news-item)
|
||||
178 (keys rule))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
179
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
180 (defn make-all-inferences
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
181 "Return a list of knowledge entries inferred from this news `item` by this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
182 `gossip`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
183 [item]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
184 (set
|
||||
180 (declare learn-news-item)
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
185 (reduce
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
181
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
186 concat
|
||||
182 (defn make-all-inferences
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
183 "Return a list of knowledge entries inferred from this news `item` by this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
184 `gossip`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
185 [item]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
186 (set
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
187 (reduce
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
188 concat
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
187 (map
|
||||
189 (map
|
||||
</span><br/>
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
188 #(:knowledge (learn-news-item {} (infer item %) false))
|
||||
190 #(:knowledge (learn-news-item {} (infer item %) false))
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
189 (:inferences (news-topics (:verb item)))))))
|
||||
191 (:inferences (news-topics (:verb item)))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
190
|
||||
192
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
191 (defn degrade-character
|
||||
193 (defn degrade-character
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
192 "Return a character specification like this `character`, but comprising
|
||||
194 "Return a character specification like this `character`, but comprising
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
193 only those properties this `gossip` is interested in."
|
||||
195 only those properties this `gossip` is interested in."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
194 [gossip character]
|
||||
196 [gossip character]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
195 ;; TODO: Not yet (really) implemented
|
||||
197 ;; TODO: Not yet (really) implemented
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
196 character)
|
||||
198 character)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
197
|
||||
199
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
198 (defn degrade-location
|
||||
200 (defn degrade-location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
199 "Return a location specification like this `location`, but comprising
|
||||
201 "Return a location specification like this `location`, but comprising
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
200 only those elements this `gossip` is interested in. If none, return
|
||||
202 only those elements this `gossip` is interested in. If none, return
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
201 `nil`."
|
||||
203 `nil`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
202 [gossip location]
|
||||
204 [gossip location]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
203 (let [l (if
|
||||
205 (let [l (if
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
204 (coll? location)
|
||||
206 (coll? location)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
205 (filter
|
||||
207 (filter
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 7 forms covered">
|
||||
206 #(when (interesting-location? gossip %) %)
|
||||
208 #(when (interesting-location? gossip %) %)
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
207 location))]
|
||||
209 location))]
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 7 forms covered">
|
||||
208 (when-not (empty? l) l)))
|
||||
210 (when-not (empty? l) l)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
209
|
||||
211
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
210 (defn learn-news-item
|
||||
212 (defn learn-news-item
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
211 "Return a gossip like this `gossip`, which has learned this news `item` if
|
||||
213 "Return a gossip like this `gossip`, which has learned this news `item` if
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
212 it is of interest to them."
|
||||
214 it is of interest to them."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
213 ;; TODO: Not yet implemented
|
||||
215 ;; TODO: Not yet implemented
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
214 ([gossip item]
|
||||
216 ([gossip item]
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
215 (learn-news-item gossip item true))
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
217 (learn-news-item gossip item true))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
216 ([gossip item follow-inferences?]
|
||||
218 ([gossip item follow-inferences?]
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
217 (if
|
||||
219 (if
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
218 (interesting-item? gossip item)
|
||||
220 (interesting-item? gossip item)
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
219 (let [g (assoc gossip :knowledge
|
||||
221 (let [g (assoc gossip :knowledge
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
220 (cons
|
||||
222 (cons
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
221 (assoc
|
||||
223 (assoc
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
222 item
|
||||
224 item
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
223 :nth-hand (if
|
||||
225 :nth-hand (if
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
224 (number? (:nth-hand item))
|
||||
226 (number? (:nth-hand item))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
225 (inc (:nth-hand item))
|
||||
227 (inc (:nth-hand item))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
226 1)
|
||||
228 1)
|
||||
</span><br/>
|
||||
<span class="partial" title="8 out of 11 forms covered">
|
||||
227 :date (if (number? (:date item)) (:date item) (now))
|
||||
229 :date (if (number? (:date item)) (:date item) (game-time))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
228 :location (degrade-location gossip (:location item))
|
||||
230 :location (degrade-location gossip (:location item))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
229 ;; ought to degratde the location
|
||||
231 ;; ought to degratde the location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
230 ;; ought to maybe-degrade characters we're not yet interested in
|
||||
232 ;; ought to maybe-degrade characters we're not yet interested in
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
231 )
|
||||
233 )
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
232 ;; ought not to add knowledge items we already have, except
|
||||
234 ;; ought not to add knowledge items we already have, except
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
233 ;; to replace if new item is of increased specificity
|
||||
235 ;; to replace if new item is of increased specificity
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
234 (:knowledge gossip)))]
|
||||
236 (:knowledge gossip)))]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
235 (if follow-inferences?
|
||||
237 (if follow-inferences?
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
236 (assoc
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
237 g
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
238 :knowledge
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 8 forms covered">
|
||||
239 (concat (:knowledge g) (make-all-inferences item)))
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
238 (assoc
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
240 g))
|
||||
239 g
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
240 :knowledge
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
241 (concat (:knowledge g) (make-all-inferences item)))
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
242 g))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
241 gossip)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
242
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
243
|
||||
243 gossip)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
244
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
245
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
246
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@
|
|||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
080 passed (as a `long`), the game time represented by that value."
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 4 forms covered">
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
081 ([] (game-time (now)))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
|
|
|
|||
54
docs/codox/Baking-the-world.html
Normal file
54
docs/codox/Baking-the-world.html
Normal file
File diff suppressed because one or more lines are too long
297
docs/codox/Populating-a-game-world.html
Normal file
297
docs/codox/Populating-a-game-world.html
Normal file
File diff suppressed because one or more lines are too long
68
docs/codox/Settling-a-game-world.html
Normal file
68
docs/codox/Settling-a-game-world.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
49
docs/codox/Voice-acting-considered-harmful.html
Normal file
49
docs/codox/Voice-acting-considered-harmful.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
docs/codox/on-dying.html
Normal file
9
docs/codox/on-dying.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,13 +1,14 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>The Great Game: Dcocumentation</title>
|
||||
<title>The Great Game: Documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="codox/css/default.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>The Great Game: Dcocumentation</h1>
|
||||
<h1>The Great Game: Documentation</h1>
|
||||
<ul>
|
||||
<li><a href="cloverage/index.html">Test coverage</a></li>
|
||||
<li><a href="codox/index.html">Primary documentaion</a></li>
|
||||
<li><a href="cloverage/index.html">Test coverage</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue