Recovery from massive git messup.
This commit is contained in:
parent
faf3dae725
commit
70b139530b
40 changed files with 767 additions and 291 deletions
|
|
@ -17,13 +17,13 @@
|
|||
<tr>
|
||||
<td><a href="the_great_game/agent/agent.clj.html">the-great-game.agent.agent</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 1 </div></td>
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 1 </div></td>
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">7</td><td class="with-number">2</td><td class="with-number">1</td>
|
||||
<td class="with-number">43</td><td class="with-number">5</td><td class="with-number">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="the_great_game/gossip/gossip.clj.html">the-great-game.gossip.gossip</a></td><td class="with-bar"><div class="covered"
|
||||
|
|
@ -48,14 +48,14 @@
|
|||
float:left;"> 38 </div></td>
|
||||
<td class="with-number">92.73 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
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: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>
|
||||
style="width:88.07339449541284%;
|
||||
float:left;"> 96 </div><div class="partial"
|
||||
style="width:7.339449541284404%;
|
||||
float:left;"> 8 </div><div class="not-covered"
|
||||
style="width:4.587155963302752%;
|
||||
float:left;"> 5 </div></td>
|
||||
<td class="with-number">95.41 %</td>
|
||||
<td class="with-number">256</td><td class="with-number">31</td><td class="with-number">109</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"
|
||||
|
|
@ -138,6 +138,32 @@
|
|||
<td class="with-number">4.03 %</td>
|
||||
<td class="with-number">173</td><td class="with-number">6</td><td class="with-number">124</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="the_great_game/objects/container.clj.html">the-great-game.objects.container</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:100.0%;
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">100.00 %</td>
|
||||
<td class="with-number">11</td><td class="with-number">1</td><td class="with-number">2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="the_great_game/objects/game_object.clj.html">the-great-game.objects.game-object</a></td><td class="with-bar"><div class="covered"
|
||||
style="width:60.0%;
|
||||
float:left;"> 3 </div><div class="not-covered"
|
||||
style="width:40.0%;
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">60.00 %</td>
|
||||
<td class="with-bar"><div class="covered"
|
||||
style="width:60.0%;
|
||||
float:left;"> 3 </div><div class="not-covered"
|
||||
style="width:40.0%;
|
||||
float:left;"> 2 </div></td>
|
||||
<td class="with-number">60.00 %</td>
|
||||
<td class="with-number">19</td><td class="with-number">2</td><td class="with-number">5</td>
|
||||
</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:99.62121212121212%;
|
||||
|
|
@ -228,9 +254,9 @@
|
|||
</tr>
|
||||
<tr><td>Totals:</td>
|
||||
<td class="with-bar"></td>
|
||||
<td class="with-number">66.88 %</td>
|
||||
<td class="with-number">66.90 %</td>
|
||||
<td class="with-bar"></td>
|
||||
<td class="with-number">68.59 %</td>
|
||||
<td class="with-number">68.74 %</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -8,22 +8,130 @@
|
|||
001 (ns the-great-game.agent.agent
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 "Anything in the game world with agency")
|
||||
002 "Anything in the game world with agency"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 (:require [the-great-game.objects.game-object :refer [ProtoObject]]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 [the-great-game.objects.container :refer [ProtoContainer]]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
003
|
||||
005
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
004 ;; hierarchy of needs probably gets implemented here
|
||||
006 ;; hierarchy of needs probably gets implemented here
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 ;; I'm probably going to want to defprotocol stuff, to define the hierarchy
|
||||
007 ;; I'm probably going to want to defprotocol stuff, to define the hierarchy
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 ;; of things in the gameworld; either that or drop to Java, wich I'd rather not do.
|
||||
008 ;; of things in the gameworld; either that or drop to Java, wich I'd rather not do.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
007
|
||||
009
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
010 (defprotocol ProtoAgent
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 "An object which can act in the world"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 (act
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
013 [actor world circle]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
014 "Allow `actor` to do something in this `world`, in the context of this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
015 `circle`; return the new state of the actor if something was done, `nil`
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
016 if nothing was done. Circle is expected to be one of
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
017
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
018 * `:active` - actors within visual/audible range of the player
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
019 character;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
020 * `:pending` - actors not in the active circle, but sufficiently close
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
021 to it that they may enter the active circle within a short period;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
022 * `:background` - actors who are active in the background in order to
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
023 handle trade, news, et cetera;
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
024 * `other` - actors who are not members of any other circle, although
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
025 I'm not clear whether it would ever be appropriate to invoke an
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
026 `act` method on them.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
027
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
028 The `act` method *must not* have side effects; it must *only* return a
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
029 new state. If the actor's intention is to seek to change the state of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
030 something else in the game world, it must add a representation of that
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
031 intention to the sequence which will be returned by its
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
032 `pending-intentions` method.")
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
033 (pending-intentions
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
034 [actor]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
035 "Returns a sequence of effects an actor intends, as a consequence of
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
036 acting. The encoding of these is not yet defined."))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
037
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
038 ;; (defrecord Agent
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
039 ;; "A default agent."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
040 ;; ProtoObject
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
041 ;; ProtoContainer
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
042 ;; ProtoAgent
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
043 ;; )
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -134,337 +134,337 @@
|
|||
043
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
044 ##### Locations:
|
||||
044 By implication, the character values passed should include *all* the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
045 information the giver knows about the character; that can then be degraded
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
046 as the receiver stores only that segment which the receiver finds
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 interesting.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
045
|
||||
048
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
046 A 'location' value is a list comprising at most the x/y coordinate location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
047 and the ids of the settlement and region (possibly hierarchically) that contain
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
048 the location. If the x/y is not local to the home of the receiving agent, they
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
049 won't remember it and won't pass it on; if any of the ids are not interesting
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
050 So location information will degrade progressively as the item is passed along.
|
||||
049 ##### Locations:
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
051
|
||||
050
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
052 It is assumed that the `:home` of a character is a location in this sense.
|
||||
051 A 'location' value is a list comprising at most the x/y coordinate location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
052 and the ids of the settlement and region (possibly hierarchically) that contain
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
053 the location. If the x/y is not local to the home of the receiving agent, they
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
054 won't remember it and won't pass it on; if any of the ids are not interesting
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
055 So location information will degrade progressively as the item is passed along.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
053
|
||||
056
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
054 ##### Inferences:
|
||||
057 It is assumed that the `:home` of a character is a location in this sense.
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
055
|
||||
058
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
056 If an agent learns that Adam has married Betty, they can infer that Betty has
|
||||
059 ##### Inferences:
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
060
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
057 married Adam; if they learn that Charles killed Dorothy, that Dorothy has died.
|
||||
061 If an agent learns that Adam has married Betty, they can infer that Betty has
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
058 I'm not convinced that my representation of inferences here is ideal.
|
||||
062 married Adam; if they learn that Charles killed Dorothy, that Dorothy has died.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
059 "
|
||||
063 I'm not convinced that my representation of inferences here is ideal.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
064 "
|
||||
</span><br/>
|
||||
<span class="covered" title="13 out of 13 forms covered">
|
||||
060 { ;; A significant attack is interesting whether or not it leads to deaths
|
||||
065 { ;; A significant attack is interesting whether or not it leads to deaths
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
061 :attack {:verb :attack :keys [:actor :other :location]}
|
||||
066 :attack {:verb :attack :keys [:actor :other :location]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
062 ;; Deaths of characters may be interesting
|
||||
067 ;; Deaths of characters may be interesting
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
063 :die {:verb :attack :keys [:actor :location]}
|
||||
068 :die {:verb :die :keys [:actor :location]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
064 ;; Deliberate killings are interesting.
|
||||
069 ;; Deliberate killings are interesting.
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
065 :kill {:verb :kill :keys [:actor :other :location]
|
||||
070 :kill {:verb :kill :keys [:actor :other :location]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
066 :inferences [{:verb :die :actor :other :other :nil}]}
|
||||
071 :inferences [{:verb :die :actor :other :other :nil}]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
067 ;; Marriages may be interesting
|
||||
072 ;; Marriages may be interesting
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
068 :marry {:verb :marry :keys [:actor :other :location]
|
||||
073 :marry {:verb :marry :keys [:actor :other :location]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
069 :inferences [{:verb :marry :actor :other :other :actor}]}
|
||||
074 :inferences [{:verb :marry :actor :other :other :actor}]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
070 ;; The end of ongoing open conflict between to characters may be interesting
|
||||
075 ;; The end of ongoing open conflict between to characters may be interesting
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
071 :peace {:verb :peace :keys [:actor :other :location]
|
||||
076 :peace {:verb :peace :keys [:actor :other :location]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
072 :inferences [{:verb :peace :actor :other :other :actor}]}
|
||||
077 :inferences [{:verb :peace :actor :other :other :actor}]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
073 ;; Things related to the plot are interesting, but will require special
|
||||
078 ;; Things related to the plot are interesting, but will require special
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
074 ;; handling. Extra keys may be required by particular plot events.
|
||||
079 ;; handling. Extra keys may be required by particular plot events.
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
075 :plot {:verb :plot :keys [:actor :other :object :location]}
|
||||
080 :plot {:verb :plot :keys [:actor :other :object :location]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
076 ;; Rapes are interesting.
|
||||
081 ;; Rapes are interesting.
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
077 :rape {:verb :rape :keys [:actor :other :location]
|
||||
082 :rape {:verb :rape :keys [:actor :other :location]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
078 ;; Should you also infer from rape that actor is male and adult?
|
||||
083 ;; Should you also infer from rape that actor is male and adult?
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
079 :inferences [{:verb :attack}
|
||||
084 :inferences [{:verb :attack}
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
080 {:verb :sex}
|
||||
085 {:verb :sex}
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
081 {:verb :sex :actor :other :other :actor}]}
|
||||
086 {:verb :sex :actor :other :other :actor}]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
082 ;; Merchants, especially, are interested in prices in other markets
|
||||
087 ;; Merchants, especially, are interested in prices in other markets
|
||||
</span><br/>
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
083 :sell {:verb :sell :keys [:actor :other :object :location :price]}
|
||||
088 :sell {:verb :sell :keys [:actor :other :object :location :price]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
084 ;; Sex can juicy gossip, although not normally if the participants are in an
|
||||
089 ;; Sex can juicy gossip, although not normally if the participants are in an
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
085 ;; established sexual relationship.
|
||||
090 ;; established sexual relationship.
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
086 :sex {:verb :sex :keys [:actor :other :location]
|
||||
091 :sex {:verb :sex :keys [:actor :other :location]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
087 :inferences [{:verb :sex :actor :other :other :actor}]}
|
||||
092 :inferences [{:verb :sex :actor :other :other :actor}]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
088 ;; Thefts are interesting
|
||||
093 ;; Thefts are interesting
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
089 :steal {:verb :steal :keys [:actor :other :object :location]}
|
||||
094 :steal {:verb :steal :keys [:actor :other :object :location]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
090 ;; The succession of rulers is interesting; of respected craftsmen,
|
||||
095 ;; The succession of rulers is interesting; of respected craftsmen,
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
091 ;; potentially also interesting.
|
||||
096 ;; potentially also interesting.
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
092 :succession {:verb :succession :keys [:actor :other :location :rank]}
|
||||
097 :succession {:verb :succession :keys [:actor :other :location :rank]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
093 ;; The start of ongoing open conflict between to characters may be interesting
|
||||
098 ;; The start of ongoing open conflict between to characters may be interesting
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
094 :war {:verb :war :keys [:actor :other :location]
|
||||
099 :war {:verb :war :keys [:actor :other :location]
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
095 :inferences [{:verb :war :actor :other :other :actor}]}
|
||||
100 :inferences [{:verb :war :actor :other :other :actor}]}
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
096 })
|
||||
101 })
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
097
|
||||
102
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
098
|
||||
103
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
099 (defn interest-in-character
|
||||
104 (defn interest-in-character
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
100 "Integer representation of how interesting this `character` is to this
|
||||
105 "Integer representation of how interesting this `character` is to this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
101 `gossip`.
|
||||
106 `gossip`.
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
102 *TODO:* this assumes that characters are passed as keywords, but, as
|
||||
107 *TODO:* this assumes that characters are passed as keywords, but, as
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
103 documented above, they probably have to be maps, to allow for degradation."
|
||||
108 documented above, they probably have to be maps, to allow for degradation."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
104 [gossip character]
|
||||
109 [gossip character]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
105 (count
|
||||
110 (count
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
106 (concat
|
||||
111 (concat
|
||||
</span><br/>
|
||||
<span class="partial" title="6 out of 12 forms covered">
|
||||
107 (filter #(= (:actor % character)) (:knowledge gossip))
|
||||
112 (filter #(= (:actor % character)) (:knowledge gossip))
|
||||
</span><br/>
|
||||
<span class="partial" title="6 out of 12 forms covered">
|
||||
108 (filter #(= (:other % character)) (:knowledge gossip)))))
|
||||
113 (filter #(= (:other % character)) (:knowledge gossip)))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
109
|
||||
114
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
110 (defn interesting-character?
|
||||
115 (defn interesting-character?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
111 "Boolean representation of whether this `character` is interesting to this
|
||||
116 "Boolean representation of whether this `character` is interesting to this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
112 `gossip`."
|
||||
117 `gossip`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
113 [gossip character]
|
||||
118 [gossip character]
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
114 (> (interest-in-character gossip character) 0))
|
||||
119 (> (interest-in-character gossip character) 0))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
115
|
||||
120
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
116 (defn interest-in-location
|
||||
121 (defn interest-in-location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
117 "Integer representation of how interesting this `location` is to this
|
||||
122 "Integer representation of how interesting this `location` is to this
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
118 `gossip`."
|
||||
123 `gossip`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
119 [gossip location]
|
||||
124 [gossip location]
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
120 (cond
|
||||
125 (cond
|
||||
</span><br/>
|
||||
<span class="partial" title="20 out of 21 forms covered">
|
||||
121 (and (map? location) (number? (:x location)) (number? (:y location)))
|
||||
126 (and (map? location) (number? (:x location)) (number? (:y location)))
|
||||
</span><br/>
|
||||
<span class="partial" title="8 out of 9 forms covered">
|
||||
122 (if-let [home (:home gossip)]
|
||||
127 (if-let [home (:home gossip)]
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
123 (let [d (distance-between location home)
|
||||
128 (let [d (distance-between location home)
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
124 i (/ 10000 d) ;; 10000 at metre scale is 10km; interest should
|
||||
129 i (/ 10000 d) ;; 10000 at metre scale is 10km; interest should
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
125 ;;fall of with distance from home, but possibly on a log scale
|
||||
130 ;;fall off with distance from home, but possibly on a log scale
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
126 ]
|
||||
131 ]
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
127 (if (> i 1) i 0))
|
||||
132 (if (> i 1) i 0))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
128 0)
|
||||
133 0)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
129 (coll? location)
|
||||
134 (coll? location)
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
130 (reduce
|
||||
135 (reduce
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
131 +
|
||||
136 +
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
132 (map
|
||||
137 (map
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
133 #(interest-in-location gossip %)
|
||||
138 #(interest-in-location gossip %)
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
134 location))
|
||||
139 location))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
135 :else
|
||||
140 :else
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
136 (count
|
||||
141 (count
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
137 (filter
|
||||
142 (filter
|
||||
</span><br/>
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
138 #(some (fn [x] (= x location)) (:location %))
|
||||
143 #(some (fn [x] (= x location)) (:location %))
|
||||
</span><br/>
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
139 (cons {:location (:home gossip)} (:knowledge gossip))))))
|
||||
144 (cons {:location (:home gossip)} (:knowledge gossip))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
140
|
||||
145
|
||||
</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">
|
||||
143 (defn interesting-location?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
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">
|
||||
145 [gossip item]
|
||||
</span><br/>
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
146 (> (interest-in-location gossip (:location item)) 0))
|
||||
146 ;; (interest-in-location {:home [{0, 0} :test-home] :knowledge []} [:test-home])
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
147
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
148 (defn interesting-object?
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
148 (defn interesting-location?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
149 [gossip object]
|
||||
149 "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">
|
||||
150 ;; TODO: Not yet (really) implemented
|
||||
150 [gossip item]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
151 true)
|
||||
<span class="covered" title="9 out of 9 forms covered">
|
||||
151 (> (interest-in-location gossip (:location item)) 0))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
152
|
||||
</span><br/>
|
||||
<span class="partial" title="1 out of 2 forms covered">
|
||||
153 (defn interesting-topic?
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
153 (defn interesting-object?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
154 [gossip topic]
|
||||
154 [gossip object]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
155 ;; TODO: Not yet (really) implemented
|
||||
|
|
@ -475,272 +475,302 @@
|
|||
<span class="blank" title="0 out of 0 forms covered">
|
||||
157
|
||||
</span><br/>
|
||||
<span class="partial" title="1 out of 2 forms covered">
|
||||
158 (defn interesting-topic?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
159 [gossip topic]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
160 ;; TODO: Not yet (really) implemented
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
161 true)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
162
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
158 (defn interesting-item?
|
||||
163 (defn interesting-item?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
159 "True if anything about this news `item` is interesting to this `gossip`."
|
||||
164 "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">
|
||||
160 [gossip item]
|
||||
165 [gossip item]
|
||||
</span><br/>
|
||||
<span class="partial" title="13 out of 17 forms covered">
|
||||
161 (or
|
||||
166 (or
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
162 (interesting-character? gossip (:actor item))
|
||||
167 (interesting-character? gossip (:actor item))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
163 (interesting-character? gossip (:other item))
|
||||
168 (interesting-character? gossip (:other item))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
164 (interesting-location? gossip (:location item))
|
||||
169 (interesting-location? gossip (:location item))
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
165 (interesting-object? gossip (:object item))
|
||||
170 (interesting-object? gossip (:object item))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
166 (interesting-topic? gossip (:verb item))))
|
||||
171 (interesting-topic? gossip (:verb item))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
167
|
||||
172
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
168 (defn infer
|
||||
173 (defn infer
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
169 "Infer a new knowledge item from this `item`, following this `rule`"
|
||||
174 "Infer a new knowledge item from this `item`, following this `rule`"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
170 [item rule]
|
||||
175 [item rule]
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
171 (reduce merge
|
||||
176 (reduce merge
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
172 item
|
||||
177 item
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
173 (cons
|
||||
178 (cons
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
174 {:verb (:verb rule)}
|
||||
179 {:verb (:verb rule)}
|
||||
</span><br/>
|
||||
<span class="covered" title="13 out of 13 forms covered">
|
||||
175 (map (fn [k] {k (apply (k rule) (list item))})
|
||||
180 (map (fn [k] {k (apply (k rule) (list item))})
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
176 (remove
|
||||
181 (remove
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
177 #(= % :verb)
|
||||
182 #(= % :verb)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
178 (keys rule))))))
|
||||
183 (keys rule))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
179
|
||||
184
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
180 (declare learn-news-item)
|
||||
185 (declare learn-news-item)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
181
|
||||
186
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
182 (defn make-all-inferences
|
||||
187 (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
|
||||
188 "Return a list of knowledge entries that can be inferred from this news
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
184 `gossip`."
|
||||
189 `item`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
185 [item]
|
||||
190 [item]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
186 (set
|
||||
191 (set
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
187 (reduce
|
||||
192 (reduce
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
188 concat
|
||||
193 concat
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
189 (map
|
||||
194 (map
|
||||
</span><br/>
|
||||
<span class="covered" title="10 out of 10 forms covered">
|
||||
190 #(:knowledge (learn-news-item {} (infer item %) false))
|
||||
195 #(:knowledge (learn-news-item {} (infer item %) false))
|
||||
</span><br/>
|
||||
<span class="covered" title="7 out of 7 forms covered">
|
||||
191 (:inferences (news-topics (:verb item)))))))
|
||||
196 (:inferences (news-topics (:verb item)))))))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
192
|
||||
197
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
193 (defn degrade-character
|
||||
198 (defn degrade-character
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
194 "Return a character specification like this `character`, but comprising
|
||||
199 "Return a character specification like this `character`, but comprising
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
195 only those properties this `gossip` is interested in."
|
||||
200 only those properties this `gossip` is interested in."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
196 [gossip character]
|
||||
201 [gossip character]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
197 ;; TODO: Not yet (really) implemented
|
||||
202 ;; TODO: Not yet (really) implemented
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
198 character)
|
||||
203 character)
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
199
|
||||
204
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
200 (defn degrade-location
|
||||
205 (defn degrade-location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
201 "Return a location specification like this `location`, but comprising
|
||||
206 "Return a location specification like this `location`, but comprising
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
202 only those elements this `gossip` is interested in. If none, return
|
||||
207 only those elements this `gossip` is interested in. If none, return
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
203 `nil`."
|
||||
208 `nil`."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
204 [gossip location]
|
||||
209 [gossip location]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
205 (let [l (if
|
||||
210 (let [l (if
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
206 (coll? location)
|
||||
211 (coll? location)
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
207 (filter
|
||||
212 (filter
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 7 forms covered">
|
||||
208 #(when (interesting-location? gossip %) %)
|
||||
213 #(when (interesting-location? gossip %) %)
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
209 location))]
|
||||
214 location))]
|
||||
</span><br/>
|
||||
<span class="partial" title="5 out of 7 forms covered">
|
||||
210 (when-not (empty? l) l)))
|
||||
215 (when-not (empty? l) l)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
211
|
||||
216
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
212 (defn learn-news-item
|
||||
217 (defn learn-news-item
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
213 "Return a gossip like this `gossip`, which has learned this news `item` if
|
||||
218 "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">
|
||||
214 it is of interest to them."
|
||||
219 it is of interest to them."
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
215 ;; TODO: Not yet implemented
|
||||
220 ;; TODO: Not yet implemented
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
216 ([gossip item]
|
||||
221 ([gossip item]
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
217 (learn-news-item gossip item true))
|
||||
222 (learn-news-item gossip item true))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
218 ([gossip item follow-inferences?]
|
||||
223 ([gossip item follow-inferences?]
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
219 (if
|
||||
224 (if
|
||||
</span><br/>
|
||||
<span class="covered" title="4 out of 4 forms covered">
|
||||
220 (interesting-item? gossip item)
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
221 (let [g (assoc gossip :knowledge
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
222 (cons
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
223 (assoc
|
||||
225 (interesting-item? gossip item)
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
224 item
|
||||
226 (let
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
227 [g (assoc
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
228 gossip
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
229 :knowledge
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
225 :nth-hand (if
|
||||
230 (cons
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
226 (number? (:nth-hand item))
|
||||
231 (assoc
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
232 item
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
233 :nth-hand (if
|
||||
</span><br/>
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
234 (number? (:nth-hand item))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 5 forms covered">
|
||||
227 (inc (:nth-hand item))
|
||||
235 (inc (:nth-hand item))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
228 1)
|
||||
236 1)
|
||||
</span><br/>
|
||||
<span class="partial" title="8 out of 11 forms covered">
|
||||
229 :date (if (number? (:date item)) (:date item) (game-time))
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
237 :time-stamp (if
|
||||
</span><br/>
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
230 :location (degrade-location gossip (:location item))
|
||||
<span class="covered" title="5 out of 5 forms covered">
|
||||
238 (number? (:time-stamp item))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
231 ;; ought to degratde the location
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
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">
|
||||
233 )
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
234 ;; ought not to add knowledge items we already have, except
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
235 ;; to replace if new item is of increased specificity
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
236 (:knowledge gossip)))]
|
||||
<span class="not-covered" title="0 out of 3 forms covered">
|
||||
239 (:time-stamp item)
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
237 (if follow-inferences?
|
||||
240 (game-time))
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
238 (assoc
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
239 g
|
||||
<span class="covered" title="6 out of 6 forms covered">
|
||||
241 :location (degrade-location gossip (:location item))
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
240 :knowledge
|
||||
242 ;; TODO: ought to maybe-degrade characters we're not yet interested in
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
241 (concat (:knowledge g) (make-all-inferences item)))
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
243 )
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
244 ;; TODO: ought not to add knowledge items we already have, except
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
245 ;; to replace if new item is of increased specificity
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
246 (:knowledge gossip)))]
|
||||
</span><br/>
|
||||
<span class="covered" title="2 out of 2 forms covered">
|
||||
247 (if follow-inferences?
|
||||
</span><br/>
|
||||
<span class="covered" title="3 out of 3 forms covered">
|
||||
248 (assoc
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
242 g))
|
||||
249 g
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
250 :knowledge
|
||||
</span><br/>
|
||||
<span class="covered" title="8 out of 8 forms covered">
|
||||
251 (concat (:knowledge g) (make-all-inferences item)))
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
252 g))
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
243 gossip)))
|
||||
253 gossip)))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
244
|
||||
254
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
245
|
||||
255
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
246
|
||||
256
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
41
docs/cloverage/the_great_game/objects/container.clj.html
Normal file
41
docs/cloverage/the_great_game/objects/container.clj.html
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../coverage.css"/> <title> the_great_game/objects/container.clj </title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
001 (ns the-great-game.objects.container
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 (:require
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
003 [the-great-game.objects.game-object :refer :all]))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
004
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
005 (defprotocol ProtoContainer
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 (contents
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 [container]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 "Return a sequence of the contents of this `container`, or `nil` if empty.")
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
009 (is-empty?
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 [container]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 "Return `true` if this `container` is empty, else `false`."))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
65
docs/cloverage/the_great_game/objects/game_object.clj.html
Normal file
65
docs/cloverage/the_great_game/objects/game_object.clj.html
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="../../coverage.css"/> <title> the_great_game/objects/game_object.clj </title>
|
||||
</head>
|
||||
<body>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
001 (ns the-great-game.objects.game-object
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
002 "Anything at all in the game world")
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
003
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
004 (defprotocol ProtoObject
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
005 "An object in the world"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
006 (id [object] "Returns the unique id of this object.")
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
007 (reify-object
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
008 [object]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
009 "Adds this `object` to the global object list. If the `object` has a
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
010 non-nil value for its `id` method, keys it to that id - **but** if the
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
011 id value is already in use, throws a hard exception. Returns the id to
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
012 which the object is keyed in the global object list."))
|
||||
</span><br/>
|
||||
<span class="blank" title="0 out of 0 forms covered">
|
||||
013
|
||||
</span><br/>
|
||||
<span class="covered" title="1 out of 1 forms covered">
|
||||
014 (defrecord GameObject
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
015 [id]
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
016 ;; "An object in the world"
|
||||
</span><br/>
|
||||
<span class="not-tracked" title="0 out of 0 forms covered">
|
||||
017 ProtoObject
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
018 (id [_] id)
|
||||
</span><br/>
|
||||
<span class="not-covered" title="0 out of 1 forms covered">
|
||||
019 (reify-object [object] "TODO: doesn't work yet"))
|
||||
</span><br/>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
79
docs/codox/Pathmaking.html
Normal file
79
docs/codox/Pathmaking.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
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
3
docs/codox/the-great-game.objects.container.html
Normal file
3
docs/codox/the-great-game.objects.container.html
Normal file
File diff suppressed because one or more lines are too long
3
docs/codox/the-great-game.objects.game-object.html
Normal file
3
docs/codox/the-great-game.objects.game-object.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
Loading…
Add table
Add a link
Reference in a new issue