Enormous progress on routing, but not there yet.

All existing unit tests still pass, but new code is not instrumented yet.
This commit is contained in:
Simon Brooke 2020-06-04 16:16:02 +01:00
parent 777b8bc077
commit 99a6c6824a
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
24 changed files with 2050 additions and 1103 deletions

View file

@ -16,18 +16,18 @@
</tr></thead>
<tr>
<td><a href="walkmap/edge.clj.html">walkmap.edge</a></td><td class="with-bar"><div class="covered"
style="width:98.32167832167832%;
float:left;"> 703 </div><div class="not-covered"
style="width:1.6783216783216783%;
style="width:98.37177747625509%;
float:left;"> 725 </div><div class="not-covered"
style="width:1.6282225237449117%;
float:left;"> 12 </div></td>
<td class="with-number">98.32 %</td>
<td class="with-number">98.37 %</td>
<td class="with-bar"><div class="covered"
style="width:95.23809523809524%;
float:left;"> 100 </div><div class="partial"
style="width:4.761904761904762%;
style="width:95.32710280373831%;
float:left;"> 102 </div><div class="partial"
style="width:4.672897196261682%;
float:left;"> 5 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-number">177</td><td class="with-number">17</td><td class="with-number">105</td>
<td class="with-number">177</td><td class="with-number">17</td><td class="with-number">107</td>
</tr>
<tr>
<td><a href="walkmap/id.clj.html">walkmap.id</a></td><td class="with-bar"><div class="covered"
@ -42,18 +42,18 @@
</tr>
<tr>
<td><a href="walkmap/microworld.clj.html">walkmap.microworld</a></td><td class="with-bar"><div class="covered"
style="width:1.7647058823529411%;
style="width:1.5957446808510638%;
float:left;"> 3 </div><div class="not-covered"
style="width:98.23529411764706%;
float:left;"> 167 </div></td>
<td class="with-number">1.76 %</td>
style="width:98.40425531914893%;
float:left;"> 185 </div></td>
<td class="with-number">1.60 %</td>
<td class="with-bar"><div class="covered"
style="width:7.5%;
float:left;"> 3 </div><div class="not-covered"
style="width:92.5%;
float:left;"> 37 </div></td>
<td class="with-number">7.50 %</td>
<td class="with-number">97</td><td class="with-number">11</td><td class="with-number">40</td>
<td class="with-number">75</td><td class="with-number">6</td><td class="with-number">40</td>
</tr>
<tr>
<td><a href="walkmap/ocean.clj.html">walkmap.ocean</a></td><td class="with-bar"><div class="covered"
@ -68,37 +68,35 @@
</tr>
<tr>
<td><a href="walkmap/path.clj.html">walkmap.path</a></td><td class="with-bar"><div class="covered"
style="width:93.98496240601504%;
float:left;"> 250 </div><div class="not-covered"
style="width:6.015037593984962%;
style="width:93.9622641509434%;
float:left;"> 249 </div><div class="not-covered"
style="width:6.037735849056604%;
float:left;"> 16 </div></td>
<td class="with-number">93.98 %</td>
<td class="with-number">93.96 %</td>
<td class="with-bar"><div class="covered"
style="width:89.47368421052632%;
float:left;"> 34 </div><div class="partial"
style="width:7.894736842105263%;
float:left;"> 3 </div><div class="not-covered"
style="width:2.6315789473684212%;
float:left;"> 1 </div></td>
<td class="with-number">97.37 %</td>
<td class="with-number">94</td><td class="with-number">9</td><td class="with-number">38</td>
style="width:88.88888888888889%;
float:left;"> 32 </div><div class="partial"
style="width:11.11111111111111%;
float:left;"> 4 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-number">93</td><td class="with-number">9</td><td class="with-number">36</td>
</tr>
<tr>
<td><a href="walkmap/polygon.clj.html">walkmap.polygon</a></td><td class="with-bar"><div class="covered"
style="width:66.40471512770138%;
float:left;"> 338 </div><div class="not-covered"
style="width:33.59528487229863%;
float:left;"> 171 </div></td>
<td class="with-number">66.40 %</td>
style="width:50.87976539589443%;
float:left;"> 347 </div><div class="not-covered"
style="width:49.12023460410557%;
float:left;"> 335 </div></td>
<td class="with-number">50.88 %</td>
<td class="with-bar"><div class="covered"
style="width:71.42857142857143%;
float:left;"> 45 </div><div class="partial"
style="width:9.523809523809524%;
float:left;"> 6 </div><div class="not-covered"
style="width:19.047619047619047%;
float:left;"> 12 </div></td>
<td class="with-number">80.95 %</td>
<td class="with-number">125</td><td class="with-number">13</td><td class="with-number">63</td>
style="width:61.333333333333336%;
float:left;"> 46 </div><div class="partial"
style="width:9.333333333333334%;
float:left;"> 7 </div><div class="not-covered"
style="width:29.333333333333332%;
float:left;"> 22 </div></td>
<td class="with-number">70.67 %</td>
<td class="with-number">155</td><td class="with-number">14</td><td class="with-number">75</td>
</tr>
<tr>
<td><a href="walkmap/read_svg.clj.html">walkmap.read-svg</a></td><td class="with-bar"><div class="covered"
@ -113,18 +111,24 @@
style="width:84.78260869565217%;
float:left;"> 39 </div></td>
<td class="with-number">15.22 %</td>
<td class="with-number">97</td><td class="with-number">6</td><td class="with-number">46</td>
<td class="with-number">100</td><td class="with-number">8</td><td class="with-number">46</td>
</tr>
<tr>
<td><a href="walkmap/routing.clj.html">walkmap.routing</a></td><td class="with-bar"><div class="covered"
style="width:100.0%;
float:left;"> 1 </div></td>
<td class="with-number">100.00 %</td>
style="width:5.678233438485805%;
float:left;"> 18 </div><div class="not-covered"
style="width:94.3217665615142%;
float:left;"> 299 </div></td>
<td class="with-number">5.68 %</td>
<td class="with-bar"><div class="covered"
style="width:100.0%;
float:left;"> 1 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-number">18</td><td class="with-number">2</td><td class="with-number">1</td>
style="width:17.56756756756757%;
float:left;"> 13 </div><div class="partial"
style="width:2.7027027027027026%;
float:left;"> 2 </div><div class="not-covered"
style="width:79.72972972972973%;
float:left;"> 59 </div></td>
<td class="with-number">20.27 %</td>
<td class="with-number">201</td><td class="with-number">21</td><td class="with-number">74</td>
</tr>
<tr>
<td><a href="walkmap/stl.clj.html">walkmap.stl</a></td><td class="with-bar"><div class="covered"
@ -145,20 +149,20 @@
</tr>
<tr>
<td><a href="walkmap/superstructure.clj.html">walkmap.superstructure</a></td><td class="with-bar"><div class="covered"
style="width:53.41614906832298%;
float:left;"> 258 </div><div class="not-covered"
style="width:46.58385093167702%;
float:left;"> 225 </div></td>
<td class="with-number">53.42 %</td>
style="width:44.61538461538461%;
float:left;"> 261 </div><div class="not-covered"
style="width:55.38461538461539%;
float:left;"> 324 </div></td>
<td class="with-number">44.62 %</td>
<td class="with-bar"><div class="covered"
style="width:56.88073394495413%;
float:left;"> 62 </div><div class="partial"
style="width:3.669724770642202%;
style="width:48.507462686567166%;
float:left;"> 65 </div><div class="partial"
style="width:2.985074626865672%;
float:left;"> 4 </div><div class="not-covered"
style="width:39.44954128440367%;
float:left;"> 43 </div></td>
<td class="with-number">60.55 %</td>
<td class="with-number">221</td><td class="with-number">19</td><td class="with-number">109</td>
style="width:48.507462686567166%;
float:left;"> 65 </div></td>
<td class="with-number">51.49 %</td>
<td class="with-number">272</td><td class="with-number">22</td><td class="with-number">134</td>
</tr>
<tr>
<td><a href="walkmap/svg.clj.html">walkmap.svg</a></td><td class="with-bar"><div class="covered"
@ -188,20 +192,20 @@
</tr>
<tr>
<td><a href="walkmap/utils.clj.html">walkmap.utils</a></td><td class="with-bar"><div class="covered"
style="width:97.04749679075738%;
float:left;"> 756 </div><div class="not-covered"
style="width:2.952503209242619%;
float:left;"> 23 </div></td>
<td class="with-number">97.05 %</td>
style="width:96.31043256997455%;
float:left;"> 757 </div><div class="not-covered"
style="width:3.6895674300254453%;
float:left;"> 29 </div></td>
<td class="with-number">96.31 %</td>
<td class="with-bar"><div class="covered"
style="width:85.71428571428571%;
float:left;"> 36 </div><div class="partial"
style="width:2.380952380952381%;
style="width:80.43478260869566%;
float:left;"> 37 </div><div class="partial"
style="width:2.1739130434782608%;
float:left;"> 1 </div><div class="not-covered"
style="width:11.904761904761905%;
float:left;"> 5 </div></td>
<td class="with-number">88.10 %</td>
<td class="with-number">113</td><td class="with-number">9</td><td class="with-number">42</td>
style="width:17.391304347826086%;
float:left;"> 8 </div></td>
<td class="with-number">82.61 %</td>
<td class="with-number">119</td><td class="with-number">10</td><td class="with-number">46</td>
</tr>
<tr>
<td><a href="walkmap/vertex.clj.html">walkmap.vertex</a></td><td class="with-bar"><div class="covered"
@ -222,9 +226,9 @@
</tr>
<tr><td>Totals:</td>
<td class="with-bar"></td>
<td class="with-number">69.99 %</td>
<td class="with-number">62.51 %</td>
<td class="with-bar"></td>
<td class="with-number">65.94 %</td>
<td class="with-number">59.55 %</td>
</tr>
</table>
</body>

View file

@ -23,7 +23,7 @@
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:as&nbsp;u]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:refer&nbsp;[canonicalise&nbsp;ensure2d&nbsp;ensure3d&nbsp;vertex&nbsp;vertex=&nbsp;vertex?]]))
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:refer&nbsp;[canonicalise&nbsp;check-vertex&nbsp;ensure2d&nbsp;ensure3d&nbsp;vertex&nbsp;vertex=&nbsp;vertex?]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
008&nbsp;&nbsp;
@ -37,17 +37,17 @@
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;[v1&nbsp;v2]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;(if
<span class="covered" title="6 out of 6 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;{:kind&nbsp;:edge
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and&nbsp;(vertex?&nbsp;v1)&nbsp;(vertex?&nbsp;v2))
<span class="covered" title="5 out of 5 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:walkmap.id&#x2F;id&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;edge&quot;))
</span><br/>
<span class="covered" title="13 out of 13 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:kind&nbsp;:edge&nbsp;:walkmap.id&#x2F;id&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;edge&quot;))&nbsp;:start&nbsp;v1&nbsp;:end&nbsp;v2}
<span class="covered" title="16 out of 16 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:start&nbsp;(check-vertex&nbsp;v1)
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.&nbsp;&quot;Must&nbsp;be&nbsp;vertices.&quot;))))
<span class="covered" title="16 out of 16 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:end&nbsp;(check-vertex&nbsp;v2)})
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
016&nbsp;&nbsp;
@ -145,7 +145,7 @@
<span class="covered" title="16 out of 16 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:z&nbsp;s)&nbsp;(&#x2F;&nbsp;(-&nbsp;(:z&nbsp;e)&nbsp;(:z&nbsp;s))&nbsp;2)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
<span class="blank" title="4 out of 4 forms covered">
048&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
@ -154,7 +154,7 @@
<span class="not-tracked" title="0 out of 0 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;an&nbsp;vertex&nbsp;parallel&nbsp;to&nbsp;`e`&nbsp;starting&nbsp;from&nbsp;the&nbsp;coordinate&nbsp;origin.&nbsp;Two
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
<span class="covered" title="2 out of 2 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;edges&nbsp;which&nbsp;are&nbsp;parallel&nbsp;will&nbsp;have&nbsp;the&nbsp;same&nbsp;unit&nbsp;vector.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">

View file

@ -26,274 +26,208 @@
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.string&nbsp;:as&nbsp;s]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[mw-cli.core&nbsp;:refer&nbsp;[process]]
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[taoensso.timbre&nbsp;:as&nbsp;l]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[mw-engine.core&nbsp;:refer&nbsp;[run-world]]
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.edge&nbsp;:as&nbsp;e]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[mw-engine.heightmap&nbsp;:as&nbsp;h]
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.polygon&nbsp;:as&nbsp;p&nbsp;:only&nbsp;[rectangle]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[mw-engine.drainage&nbsp;:as&nbsp;d]
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.superstructure&nbsp;:refer&nbsp;[store]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[mw-parser.bulk&nbsp;:as&nbsp;parser]
012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.tag&nbsp;:as&nbsp;t&nbsp;:only&nbsp;[tag]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[taoensso.timbre&nbsp;:as&nbsp;l]
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:as&nbsp;v&nbsp;:only&nbsp;[check-vertex&nbsp;vertex&nbsp;vertex?]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.edge&nbsp;:as&nbsp;e]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.polygon&nbsp;:as&nbsp;p&nbsp;:only&nbsp;[check-polygon&nbsp;polygon?&nbsp;rectangle]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.superstructure&nbsp;:refer&nbsp;[store]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.tag&nbsp;:as&nbsp;t&nbsp;:only&nbsp;[tag&nbsp;tags]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:as&nbsp;u&nbsp;:only&nbsp;[check-kind-type&nbsp;check-kind-type-seq&nbsp;kind-type&nbsp;truncate]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:as&nbsp;v&nbsp;:only&nbsp;[vertex&nbsp;vertex?]]))
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:as&nbsp;u&nbsp;:only&nbsp;[truncate]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
020&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;&nbsp;(def&nbsp;settlement-rules&nbsp;(parser&#x2F;compile-file&nbsp;&quot;resources&#x2F;rules&#x2F;settlement_rules.txt&quot;))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
022&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;;;&nbsp;(def&nbsp;w0&nbsp;(h&#x2F;apply-heightmap&nbsp;&quot;..&#x2F;the-great-game&#x2F;resources&#x2F;maps&#x2F;heightmap.png&quot;))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;;;&nbsp;(def&nbsp;w1&nbsp;(d&#x2F;rain-world&nbsp;(d&#x2F;flood-hollows&nbsp;w0)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;;;&nbsp;(def&nbsp;w2&nbsp;(drainage&#x2F;flow-world-nr&nbsp;w1))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
026&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;;;&nbsp;(def&nbsp;w3&nbsp;(run-world&nbsp;w2&nbsp;nil&nbsp;settlement-rules&nbsp;100))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
028&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
029&nbsp;&nbsp;;;&nbsp;(with-open&nbsp;[w&nbsp;(clojure.java.io&#x2F;writer&nbsp;&quot;settlement_1.edn&quot;)]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;(binding&nbsp;[*out*&nbsp;w]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pr
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(run-world&nbsp;w0&nbsp;nil&nbsp;settlement-rules&nbsp;100))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
033&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;;;&nbsp;(process
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;(h&#x2F;apply-heightmap&nbsp;&quot;resources&#x2F;small_hill.png&quot;)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;(parser&#x2F;compile-file&nbsp;&quot;resources&#x2F;rules&#x2F;settlement_rules.txt&quot;)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;100
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&quot;small_hill.edn&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&quot;small_hill.html&quot;)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
040&nbsp;&nbsp;
015&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
041&nbsp;&nbsp;(defn&nbsp;cell-&gt;polygon
016&nbsp;&nbsp;(defn&nbsp;cell-&gt;polygon
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;([cell]
017&nbsp;&nbsp;&nbsp;&nbsp;&quot;From&nbsp;this&nbsp;MicroWorld&nbsp;`cell`,&nbsp;construct&nbsp;a&nbsp;walkmap&nbsp;polygon&nbsp;(specifically,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;rectangle.&nbsp;If&nbsp;`scale-vector`&nbsp;passed&nbsp;and&nbsp;is&nbsp;a&nbsp;vertex,&nbsp;scale&nbsp;all&nbsp;the&nbsp;vertices
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;the&nbsp;cell&nbsp;by&nbsp;that&nbsp;vector.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;([cell]
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cell-&gt;polygon&nbsp;cell&nbsp;(v&#x2F;vertex&nbsp;1&nbsp;1&nbsp;1)))
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cell-&gt;polygon&nbsp;cell&nbsp;(v&#x2F;vertex&nbsp;1&nbsp;1&nbsp;1)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;([cell&nbsp;scale-vector]
022&nbsp;&nbsp;&nbsp;&nbsp;([cell&nbsp;scale-vector]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(t&#x2F;tag
023&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(t&#x2F;tag
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc
024&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(merge
025&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(merge
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cell
026&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cell
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[w&nbsp;(*&nbsp;(:x&nbsp;cell)&nbsp;(:x&nbsp;scale-vector))
<span class="not-covered" title="0 out of 24 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[w&nbsp;(*&nbsp;(:x&nbsp;cell)&nbsp;(:x&nbsp;(v&#x2F;check-vertex&nbsp;scale-vector)))
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s&nbsp;(*&nbsp;(:y&nbsp;cell)&nbsp;(:y&nbsp;scale-vector))
028&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s&nbsp;(*&nbsp;(:y&nbsp;cell)&nbsp;(:y&nbsp;scale-vector))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e&nbsp;(+&nbsp;w&nbsp;(:x&nbsp;scale-vector))
029&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e&nbsp;(+&nbsp;w&nbsp;(:x&nbsp;scale-vector))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;(+&nbsp;s&nbsp;(:y&nbsp;scale-vector))
030&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n&nbsp;(+&nbsp;s&nbsp;(:y&nbsp;scale-vector))
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z&nbsp;(*&nbsp;(:altitude&nbsp;cell)&nbsp;(:z&nbsp;scale-vector))]
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z&nbsp;(*&nbsp;(:altitude&nbsp;cell)&nbsp;(:z&nbsp;scale-vector))]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(p&#x2F;rectangle
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(p&#x2F;rectangle
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(v&#x2F;vertex&nbsp;s&nbsp;w&nbsp;z)
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(v&#x2F;vertex&nbsp;s&nbsp;w&nbsp;z)
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(v&#x2F;vertex&nbsp;n&nbsp;e&nbsp;z))))
034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(v&#x2F;vertex&nbsp;n&nbsp;e&nbsp;z))))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:walkmap.id&#x2F;id
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:walkmap.id&#x2F;id
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;mw-cell&quot;)))
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;mw-cell&quot;)))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:state&nbsp;cell))))
037&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:state&nbsp;cell))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
060&nbsp;&nbsp;
038&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
061&nbsp;&nbsp;(defn&nbsp;load-microworld-edn
039&nbsp;&nbsp;(defn&nbsp;load-microworld-edn
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&quot;While&nbsp;it&nbsp;would&nbsp;be&nbsp;possible&nbsp;to&nbsp;call&nbsp;MicroWorld&nbsp;functions&nbsp;directly&nbsp;from
040&nbsp;&nbsp;&nbsp;&nbsp;&quot;While&nbsp;it&nbsp;would&nbsp;be&nbsp;possible&nbsp;to&nbsp;call&nbsp;MicroWorld&nbsp;functions&nbsp;directly&nbsp;from
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;Walkmap,&nbsp;the&nbsp;fact&nbsp;is&nbsp;that&nbsp;running&nbsp;MicroWorld&nbsp;is&nbsp;so&nbsp;phenomenally
041&nbsp;&nbsp;&nbsp;&nbsp;Walkmap,&nbsp;the&nbsp;fact&nbsp;is&nbsp;that&nbsp;running&nbsp;MicroWorld&nbsp;is&nbsp;so&nbsp;phenomenally
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;compute-heavy&nbsp;that&nbsp;it&#x27;s&nbsp;much&nbsp;more&nbsp;sensible&nbsp;to&nbsp;do&nbsp;it&nbsp;in&nbsp;batch&nbsp;mode.&nbsp;So&nbsp;the
042&nbsp;&nbsp;&nbsp;&nbsp;compute-heavy&nbsp;that&nbsp;it&#x27;s&nbsp;much&nbsp;more&nbsp;sensible&nbsp;to&nbsp;do&nbsp;it&nbsp;in&nbsp;batch&nbsp;mode.&nbsp;So&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;better&nbsp;plan&nbsp;is&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;pull&nbsp;the&nbsp;output&nbsp;from&nbsp;MicroWorld&nbsp;-&nbsp;as&nbsp;an&nbsp;EDN
043&nbsp;&nbsp;&nbsp;&nbsp;better&nbsp;plan&nbsp;is&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;pull&nbsp;the&nbsp;output&nbsp;from&nbsp;MicroWorld&nbsp;-&nbsp;as&nbsp;an&nbsp;EDN
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;structure&nbsp;-&nbsp;into&nbsp;a&nbsp;walkmap&nbsp;superstructure.&quot;
044&nbsp;&nbsp;&nbsp;&nbsp;structure&nbsp;-&nbsp;into&nbsp;a&nbsp;walkmap&nbsp;superstructure.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;([filename]
045&nbsp;&nbsp;&nbsp;&nbsp;([filename]
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(load-microworld-edn&nbsp;filename&nbsp;:mw))
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(load-microworld-edn&nbsp;filename&nbsp;:mw))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;([filename&nbsp;map-kind]
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when-not
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(keyword?&nbsp;map-kind)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(u&#x2F;truncate
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Must&nbsp;be&nbsp;a&nbsp;keyword:&nbsp;&quot;&nbsp;(or&nbsp;map-kind&nbsp;&quot;nil&quot;))&nbsp;80))))
047&nbsp;&nbsp;&nbsp;&nbsp;([filename&nbsp;map-kind]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(load-microworld-edn&nbsp;filename&nbsp;map-kind&nbsp;nil))
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when-not
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(keyword?&nbsp;map-kind)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(u&#x2F;truncate
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Must&nbsp;be&nbsp;a&nbsp;keyword:&nbsp;&quot;&nbsp;(or&nbsp;map-kind&nbsp;&quot;nil&quot;))&nbsp;80))))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(load-microworld-edn&nbsp;filename&nbsp;map-kind&nbsp;nil))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;([filename&nbsp;mapkind&nbsp;superstucture]
054&nbsp;&nbsp;&nbsp;&nbsp;([filename&nbsp;mapkind&nbsp;superstucture]
</span><br/>
<span class="not-covered" title="0 out of 10 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(load-microworld-edn&nbsp;filename&nbsp;mapkind&nbsp;superstucture&nbsp;(v&#x2F;vertex&nbsp;1&nbsp;1&nbsp;1)))
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(load-microworld-edn&nbsp;filename&nbsp;mapkind&nbsp;superstucture&nbsp;(v&#x2F;vertex&nbsp;1&nbsp;1&nbsp;1)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;([filename&nbsp;map-kind&nbsp;superstructure&nbsp;scale-vertex]
056&nbsp;&nbsp;&nbsp;&nbsp;([filename&nbsp;map-kind&nbsp;superstructure&nbsp;scale-vertex]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[mw&nbsp;(try
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[mw&nbsp;(try
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(with-open&nbsp;[r&nbsp;(io&#x2F;reader&nbsp;filename)]
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(with-open&nbsp;[r&nbsp;(io&#x2F;reader&nbsp;filename)]
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(edn&#x2F;read&nbsp;(java.io.PushbackReader.&nbsp;r)))
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(edn&#x2F;read&nbsp;(java.io.PushbackReader.&nbsp;r)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;RuntimeException&nbsp;e
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;RuntimeException&nbsp;e
</span><br/>
<span class="not-covered" title="0 out of 15 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(l&#x2F;error&nbsp;&quot;Error&nbsp;parsing&nbsp;edn&nbsp;file&nbsp;&#x27;%s&#x27;:&nbsp;%s\n&quot;
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(l&#x2F;error&nbsp;&quot;Error&nbsp;parsing&nbsp;edn&nbsp;file&nbsp;&#x27;%s&#x27;:&nbsp;%s\n&quot;
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;(.getMessage&nbsp;e))))
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;(.getMessage&nbsp;e))))
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polys&nbsp;(reduce
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polys&nbsp;(reduce
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;concat
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;concat
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map&nbsp;(fn&nbsp;[row]&nbsp;(map&nbsp;cell-&gt;polygon&nbsp;row))&nbsp;mw))]
065&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map&nbsp;(fn&nbsp;[row]&nbsp;(map&nbsp;cell-&gt;polygon&nbsp;row))&nbsp;mw))]
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(map?&nbsp;superstructure)
066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(map?&nbsp;superstructure)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(reduce
067&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(reduce
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(store&nbsp;%2&nbsp;%1)
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(store&nbsp;%2&nbsp;%1)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;superstructure
069&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;superstructure
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polys)
070&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polys)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polys))))
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;polys))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
094&nbsp;&nbsp;
072&nbsp;&nbsp;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
095&nbsp;&nbsp;
073&nbsp;&nbsp;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
096&nbsp;&nbsp;
074&nbsp;&nbsp;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
097&nbsp;&nbsp;
075&nbsp;&nbsp;
</span><br/>
</body>
</html>

View file

@ -32,7 +32,7 @@
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:refer&nbsp;[check-kind-type&nbsp;check-kind-type-seq&nbsp;kind-type]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:refer&nbsp;[vertex?]]))
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:refer&nbsp;[check-vertices&nbsp;vertex?]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
011&nbsp;&nbsp;
@ -88,203 +88,200 @@
<span class="not-tracked" title="0 out of 0 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;[&amp;&nbsp;vertices]
</span><br/>
<span class="covered" title="26 out of 26 forms covered">
029&nbsp;&nbsp;&nbsp;&nbsp;(check-kind-type-seq&nbsp;vertices&nbsp;vertex?&nbsp;:vertex)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;(if
029&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;vertices)&nbsp;1)
<span class="covered" title="30 out of 30 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;(check-vertices&nbsp;vertices))&nbsp;1)
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:vertices&nbsp;vertices&nbsp;:walkmap.id&#x2F;id&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;path&quot;))&nbsp;:kind&nbsp;:path}
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:vertices&nbsp;vertices&nbsp;:walkmap.id&#x2F;id&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;path&quot;))&nbsp;:kind&nbsp;:path}
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.&nbsp;&quot;Path&nbsp;must&nbsp;have&nbsp;more&nbsp;than&nbsp;one&nbsp;vertex.&quot;))))
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.&nbsp;&quot;Path&nbsp;must&nbsp;have&nbsp;more&nbsp;than&nbsp;one&nbsp;vertex.&quot;))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
034&nbsp;&nbsp;
033&nbsp;&nbsp;
</span><br/>
<span class="covered" title="22 out of 22 forms covered">
035&nbsp;&nbsp;(defmacro&nbsp;check-path
034&nbsp;&nbsp;(defmacro&nbsp;check-path
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;path,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
035&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;path,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
036&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
037&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;[o]
038&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type&nbsp;~o&nbsp;path?&nbsp;:path))
039&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type&nbsp;~o&nbsp;path?&nbsp;:path))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
041&nbsp;&nbsp;
040&nbsp;&nbsp;
</span><br/>
<span class="covered" title="21 out of 21 forms covered">
042&nbsp;&nbsp;(defmacro&nbsp;check-paths
041&nbsp;&nbsp;(defmacro&nbsp;check-paths
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;sequence&nbsp;of&nbsp;paths,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
042&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;sequence&nbsp;of&nbsp;paths,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
043&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
044&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;[o]
045&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type-seq&nbsp;~o&nbsp;path?&nbsp;:path))
</span><br/>
<span class="blank" title="0 out of 2 forms covered">
048&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
049&nbsp;&nbsp;(defn&nbsp;polygon-&gt;path
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;a&nbsp;polygon,&nbsp;return&nbsp;an&nbsp;equivalent&nbsp;path.&nbsp;What&#x27;s&nbsp;different&nbsp;about
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;path&nbsp;is&nbsp;that&nbsp;in&nbsp;polygons&nbsp;there&nbsp;is&nbsp;an&nbsp;implicit&nbsp;edge&nbsp;between&nbsp;the&nbsp;first
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;vertex&nbsp;and&nbsp;the&nbsp;last.&nbsp;In&nbsp;paths,&nbsp;there&nbsp;isn&#x27;t,&nbsp;so&nbsp;we&nbsp;need&nbsp;to&nbsp;add&nbsp;that
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;edge&nbsp;explicitly.
046&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type-seq&nbsp;~o&nbsp;path?&nbsp;:path))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
054&nbsp;&nbsp;
047&nbsp;&nbsp;
</span><br/>
<span class="partial" title="1 out of 3 forms covered">
048&nbsp;&nbsp;(defn&nbsp;polygon-&gt;path
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;polygon,&nbsp;will&nbsp;throw&nbsp;an&nbsp;exception.&quot;
049&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;a&nbsp;polygon,&nbsp;return&nbsp;an&nbsp;equivalent&nbsp;path.&nbsp;What&#x27;s&nbsp;different&nbsp;about
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;[o]
050&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;path&nbsp;is&nbsp;that&nbsp;in&nbsp;polygons&nbsp;there&nbsp;is&nbsp;an&nbsp;implicit&nbsp;edge&nbsp;between&nbsp;the&nbsp;first
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;;;&nbsp;this&nbsp;is&nbsp;breaking,&nbsp;but&nbsp;I&nbsp;have&nbsp;NO&nbsp;IDEA&nbsp;why!
051&nbsp;&nbsp;&nbsp;&nbsp;vertex&nbsp;and&nbsp;the&nbsp;last.&nbsp;In&nbsp;paths,&nbsp;there&nbsp;isn&#x27;t,&nbsp;so&nbsp;we&nbsp;need&nbsp;to&nbsp;add&nbsp;that
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
058&nbsp;&nbsp;;;&nbsp;&nbsp;(check-polygon&nbsp;o&nbsp;polygon?&nbsp;:polygon)
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;(assoc&nbsp;(dissoc&nbsp;o&nbsp;:vertices)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:kind&nbsp;:path
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;`concat`&nbsp;rather&nbsp;than&nbsp;`conj`&nbsp;because&nbsp;order&nbsp;matters.
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:vertices&nbsp;(concat&nbsp;(:vertices&nbsp;o)&nbsp;(list&nbsp;(first&nbsp;(:vertices&nbsp;o))))))
052&nbsp;&nbsp;&nbsp;&nbsp;edge&nbsp;explicitly.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
063&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
064&nbsp;&nbsp;(defn&nbsp;path-&gt;edges
053&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&quot;if&nbsp;`o`&nbsp;is&nbsp;a&nbsp;path,&nbsp;a&nbsp;polygon,&nbsp;or&nbsp;a&nbsp;sequence&nbsp;of&nbsp;vertices,&nbsp;return&nbsp;a&nbsp;sequence&nbsp;of
054&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;polygon,&nbsp;will&nbsp;throw&nbsp;an&nbsp;exception.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;edges&nbsp;representing&nbsp;that&nbsp;path,&nbsp;polygon&nbsp;or&nbsp;sequence.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
067&nbsp;&nbsp;
055&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;Throws&nbsp;`IllegalArgumentException`&nbsp;if&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;path,&nbsp;a&nbsp;polygon,&nbsp;or
056&nbsp;&nbsp;;;&nbsp;this&nbsp;is&nbsp;breaking,&nbsp;but&nbsp;I&nbsp;have&nbsp;NO&nbsp;IDEA&nbsp;why!
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;sequence&nbsp;of&nbsp;vertices.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="covered" title="14 out of 14 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(seq?&nbsp;o)&nbsp;(when
</span><br/>
<span class="partial" title="4 out of 5 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex?&nbsp;(first&nbsp;o))
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex?&nbsp;(first&nbsp;(rest&nbsp;o))))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cons
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;TODO:&nbsp;think&nbsp;about:&nbsp;when&nbsp;constructing&nbsp;an&nbsp;edge&nbsp;from&nbsp;a&nbsp;path,&nbsp;should&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;constructed&nbsp;edge&nbsp;be&nbsp;tagged&nbsp;with&nbsp;the&nbsp;tags&nbsp;of&nbsp;the&nbsp;path?
057&nbsp;&nbsp;;;&nbsp;&nbsp;(check-polygon&nbsp;o&nbsp;polygon?&nbsp;:polygon)
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(e&#x2F;edge&nbsp;(first&nbsp;o)&nbsp;(first&nbsp;(rest&nbsp;o)))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(path-&gt;edges&nbsp;(rest&nbsp;o))))
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(path?&nbsp;o)&nbsp;(path-&gt;edges&nbsp;(:vertices&nbsp;o))
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(polygon?&nbsp;o)&nbsp;(path-&gt;edges&nbsp;(polygon-&gt;path&nbsp;o))
058&nbsp;&nbsp;&nbsp;&nbsp;(assoc&nbsp;(dissoc&nbsp;o&nbsp;:vertices)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:kind&nbsp;:path
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Not&nbsp;a&nbsp;path&nbsp;or&nbsp;sequence&nbsp;of&nbsp;vertices!&quot;))))
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;`concat`&nbsp;rather&nbsp;than&nbsp;`conj`&nbsp;because&nbsp;order&nbsp;matters.
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:vertices&nbsp;(concat&nbsp;(:vertices&nbsp;o)&nbsp;(list&nbsp;(first&nbsp;(:vertices&nbsp;o))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
086&nbsp;&nbsp;
062&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
087&nbsp;&nbsp;(defn&nbsp;length
063&nbsp;&nbsp;(defn&nbsp;path-&gt;edges
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;the&nbsp;length&nbsp;of&nbsp;this&nbsp;path,&nbsp;in&nbsp;metres.&nbsp;**Note&nbsp;that**
064&nbsp;&nbsp;&nbsp;&nbsp;&quot;if&nbsp;`o`&nbsp;is&nbsp;a&nbsp;path,&nbsp;a&nbsp;polygon,&nbsp;or&nbsp;a&nbsp;sequence&nbsp;of&nbsp;vertices,&nbsp;return&nbsp;a&nbsp;sequence&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;This&nbsp;is&nbsp;not&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;distance&nbsp;from&nbsp;the&nbsp;start&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;the
065&nbsp;&nbsp;&nbsp;&nbsp;edges&nbsp;representing&nbsp;that&nbsp;path,&nbsp;polygon&nbsp;or&nbsp;sequence.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
066&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;path,&nbsp;which,&nbsp;except&nbsp;for&nbsp;absolutely&nbsp;straight&nbsp;paths,&nbsp;will&nbsp;be&nbsp;shorter;
067&nbsp;&nbsp;&nbsp;&nbsp;Throws&nbsp;`IllegalArgumentException`&nbsp;if&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;path,&nbsp;a&nbsp;polygon,&nbsp;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;It&nbsp;is&nbsp;not&nbsp;even&nbsp;quite&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;length&nbsp;of&nbsp;the&nbsp;path&nbsp;*as&nbsp;rendered*,
068&nbsp;&nbsp;&nbsp;&nbsp;sequence&nbsp;of&nbsp;vertices.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;since&nbsp;paths&nbsp;will&nbsp;generally&nbsp;be&nbsp;rendered&nbsp;as&nbsp;spline&nbsp;curves.&quot;
069&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(seq?&nbsp;o)&nbsp;(when
</span><br/>
<span class="partial" title="13 out of 14 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex?&nbsp;(first&nbsp;o))
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex?&nbsp;(first&nbsp;(rest&nbsp;o))))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cons
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;[path]
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;TODO:&nbsp;think&nbsp;about:&nbsp;when&nbsp;constructing&nbsp;an&nbsp;edge&nbsp;from&nbsp;a&nbsp;path,&nbsp;should&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;constructed&nbsp;edge&nbsp;be&nbsp;tagged&nbsp;with&nbsp;the&nbsp;tags&nbsp;of&nbsp;the&nbsp;path?
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(e&#x2F;edge&nbsp;(first&nbsp;o)&nbsp;(first&nbsp;(rest&nbsp;o)))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(path-&gt;edges&nbsp;(rest&nbsp;o))))
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(path?&nbsp;o)&nbsp;(path-&gt;edges&nbsp;(:vertices&nbsp;o))
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(polygon?&nbsp;o)&nbsp;(path-&gt;edges&nbsp;(polygon-&gt;path&nbsp;o))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Not&nbsp;a&nbsp;path&nbsp;or&nbsp;sequence&nbsp;of&nbsp;vertices!&quot;))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
085&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
086&nbsp;&nbsp;(defn&nbsp;length
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;the&nbsp;length&nbsp;of&nbsp;this&nbsp;path,&nbsp;in&nbsp;metres.&nbsp;**Note&nbsp;that**
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;This&nbsp;is&nbsp;not&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;distance&nbsp;from&nbsp;the&nbsp;start&nbsp;to&nbsp;the&nbsp;end&nbsp;of&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;path,&nbsp;which,&nbsp;except&nbsp;for&nbsp;absolutely&nbsp;straight&nbsp;paths,&nbsp;will&nbsp;be&nbsp;shorter;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;It&nbsp;is&nbsp;not&nbsp;even&nbsp;quite&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;length&nbsp;of&nbsp;the&nbsp;path&nbsp;*as&nbsp;rendered*,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;since&nbsp;paths&nbsp;will&nbsp;generally&nbsp;be&nbsp;rendered&nbsp;as&nbsp;spline&nbsp;curves.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;[path]
</span><br/>
<span class="partial" title="14 out of 24 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;(reduce&nbsp;+&nbsp;(map&nbsp;e&#x2F;length&nbsp;(path-&gt;edges&nbsp;(check-path&nbsp;path)))))
093&nbsp;&nbsp;&nbsp;&nbsp;(reduce&nbsp;+&nbsp;(map&nbsp;e&#x2F;length&nbsp;(path-&gt;edges&nbsp;(check-path&nbsp;path)))))
</span><br/>
</body>
</html>

View file

@ -20,364 +20,454 @@
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.tag&nbsp;:as&nbsp;t]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:refer&nbsp;[check-kind-type&nbsp;check-kind-type-seq&nbsp;kind-type]]
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:refer&nbsp;[check-kind-type
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:refer&nbsp;[check-vertex&nbsp;check-vertices&nbsp;vertex&nbsp;vertex?]]))
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;check-kind-type-seq
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kind-type
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;not-yet-implemented]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:refer&nbsp;[check-vertex&nbsp;check-vertices&nbsp;vertex&nbsp;vertex?]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
008&nbsp;&nbsp;
011&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
009&nbsp;&nbsp;(defn&nbsp;polygon?
012&nbsp;&nbsp;(defn&nbsp;polygon?
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&quot;True&nbsp;if&nbsp;`o`&nbsp;satisfies&nbsp;the&nbsp;conditions&nbsp;for&nbsp;a&nbsp;polygon.&nbsp;A&nbsp;polygon&nbsp;shall&nbsp;be&nbsp;a
013&nbsp;&nbsp;&nbsp;&nbsp;&quot;True&nbsp;if&nbsp;`o`&nbsp;satisfies&nbsp;the&nbsp;conditions&nbsp;for&nbsp;a&nbsp;polygon.&nbsp;A&nbsp;polygon&nbsp;shall&nbsp;be&nbsp;a
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;map&nbsp;which&nbsp;has&nbsp;a&nbsp;value&nbsp;for&nbsp;the&nbsp;key&nbsp;`:vertices`,&nbsp;where&nbsp;that&nbsp;value&nbsp;is&nbsp;a&nbsp;sequence
014&nbsp;&nbsp;&nbsp;&nbsp;map&nbsp;which&nbsp;has&nbsp;a&nbsp;value&nbsp;for&nbsp;the&nbsp;key&nbsp;`:vertices`,&nbsp;where&nbsp;that&nbsp;value&nbsp;is&nbsp;a&nbsp;sequence
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;vertices.&quot;
015&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;vertices.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;[o]
016&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;(let
017&nbsp;&nbsp;&nbsp;&nbsp;(let
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[v&nbsp;(:vertices&nbsp;o)]
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[v&nbsp;(:vertices&nbsp;o)]
</span><br/>
<span class="partial" title="18 out of 22 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
017&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;v)
020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;v)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;v)&nbsp;2)
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;v)&nbsp;2)
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(every?&nbsp;vertex?&nbsp;v)
022&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(every?&nbsp;vertex?&nbsp;v)
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:walkmap.id&#x2F;id&nbsp;o)
023&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:walkmap.id&#x2F;id&nbsp;o)
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or&nbsp;(nil?&nbsp;(:kind&nbsp;o))&nbsp;(=&nbsp;(:kind&nbsp;o)&nbsp;:polygon)))))
024&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or&nbsp;(nil?&nbsp;(:kind&nbsp;o))&nbsp;(=&nbsp;(:kind&nbsp;o)&nbsp;:polygon)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
022&nbsp;&nbsp;
025&nbsp;&nbsp;
</span><br/>
<span class="covered" title="22 out of 22 forms covered">
023&nbsp;&nbsp;(defmacro&nbsp;check-polygon
026&nbsp;&nbsp;(defmacro&nbsp;check-polygon
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;polygon,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
027&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;polygon,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
028&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
029&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;[o]
030&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type&nbsp;~o&nbsp;polygon?&nbsp;:polygon))
031&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type&nbsp;~o&nbsp;polygon?&nbsp;:polygon))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
029&nbsp;&nbsp;
032&nbsp;&nbsp;
</span><br/>
<span class="covered" title="21 out of 21 forms covered">
030&nbsp;&nbsp;(defmacro&nbsp;check-polygons
033&nbsp;&nbsp;(defmacro&nbsp;check-polygons
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;sequence&nbsp;of&nbsp;polygons,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
034&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;sequence&nbsp;of&nbsp;polygons,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
035&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
036&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;[o]
037&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type-seq&nbsp;~o&nbsp;polygon?&nbsp;:polygon))
038&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type-seq&nbsp;~o&nbsp;polygon?&nbsp;:polygon))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
036&nbsp;&nbsp;
039&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
037&nbsp;&nbsp;(defn&nbsp;triangle?
040&nbsp;&nbsp;(defn&nbsp;triangle?
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;&quot;True&nbsp;if&nbsp;`o`&nbsp;satisfies&nbsp;the&nbsp;conditions&nbsp;for&nbsp;a&nbsp;triangle.&nbsp;A&nbsp;triangle&nbsp;shall&nbsp;be&nbsp;a
041&nbsp;&nbsp;&nbsp;&nbsp;&quot;True&nbsp;if&nbsp;`o`&nbsp;satisfies&nbsp;the&nbsp;conditions&nbsp;for&nbsp;a&nbsp;triangle.&nbsp;A&nbsp;triangle&nbsp;shall&nbsp;be&nbsp;a
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;polygon&nbsp;with&nbsp;exactly&nbsp;three&nbsp;vertices.&quot;
042&nbsp;&nbsp;&nbsp;&nbsp;polygon&nbsp;with&nbsp;exactly&nbsp;three&nbsp;vertices.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;[o]
043&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="partial" title="5 out of 6 forms covered">
041&nbsp;&nbsp;&nbsp;&nbsp;(and
044&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;o)
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;o)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;(count&nbsp;(:vertices&nbsp;o))&nbsp;3)))
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;(count&nbsp;(:vertices&nbsp;o))&nbsp;3)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
044&nbsp;&nbsp;
047&nbsp;&nbsp;
</span><br/>
<span class="covered" title="23 out of 23 forms covered">
045&nbsp;&nbsp;(defmacro&nbsp;check-triangle
<span class="partial" title="25 out of 33 forms covered">
048&nbsp;&nbsp;(defmacro&nbsp;check-triangle
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;triangle,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
049&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;`o`&nbsp;is&nbsp;not&nbsp;a&nbsp;triangle,&nbsp;throw&nbsp;an&nbsp;`IllegalArgumentException`&nbsp;with&nbsp;an
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
050&nbsp;&nbsp;&nbsp;&nbsp;appropriate&nbsp;message;&nbsp;otherwise,&nbsp;returns&nbsp;`o`.&nbsp;Macro,&nbsp;so&nbsp;exception&nbsp;is&nbsp;thrown
</span><br/>
<span class="partial" title="2 out of 10 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
<span class="not-covered" title="0 out of 2 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;calling&nbsp;function.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;[o]
052&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type&nbsp;~o&nbsp;triangle?&nbsp;:triangle))
053&nbsp;&nbsp;&nbsp;&nbsp;`(check-kind-type&nbsp;~o&nbsp;triangle?&nbsp;:triangle))
</span><br/>
<span class="blank" title="0 out of 2 forms covered">
051&nbsp;&nbsp;
<span class="blank" title="0 out of 0 forms covered">
054&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
052&nbsp;&nbsp;(defn&nbsp;polygon
055&nbsp;&nbsp;(defn&nbsp;polygon
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;polygon&nbsp;constructed&nbsp;from&nbsp;these&nbsp;`vertices`.&quot;
056&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;polygon&nbsp;constructed&nbsp;from&nbsp;these&nbsp;`vertices`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;[&amp;&nbsp;vertices]
057&nbsp;&nbsp;&nbsp;&nbsp;[&amp;&nbsp;vertices]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;(if
<span class="covered" title="2 out of 2 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;vertices)&nbsp;2)
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;vertices)&nbsp;2)
</span><br/>
<span class="covered" title="30 out of 30 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:vertices&nbsp;(check-vertices&nbsp;vertices)
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:vertices&nbsp;(check-vertices&nbsp;vertices)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:walkmap.id&#x2F;id&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;poly&quot;))
<span class="covered" title="5 out of 5 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:walkmap.id&#x2F;id&nbsp;(keyword&nbsp;(gensym&nbsp;&quot;poly&quot;))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:kind&nbsp;:polygon}
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:kind&nbsp;:polygon}
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(IllegalArgumentException.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;A&nbsp;polygon&nbsp;must&nbsp;have&nbsp;at&nbsp;least&nbsp;3&nbsp;vertices.&quot;))))
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;A&nbsp;polygon&nbsp;must&nbsp;have&nbsp;at&nbsp;least&nbsp;3&nbsp;vertices.&quot;))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
062&nbsp;&nbsp;
065&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
063&nbsp;&nbsp;(defn&nbsp;rectangle
066&nbsp;&nbsp;(defn&nbsp;rectangle
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;rectangle,&nbsp;with&nbsp;edges&nbsp;aligned&nbsp;east-west&nbsp;and&nbsp;north-south,&nbsp;whose
067&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;rectangle,&nbsp;with&nbsp;edges&nbsp;aligned&nbsp;east-west&nbsp;and&nbsp;north-south,&nbsp;whose
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;south-west&nbsp;corner&nbsp;is&nbsp;the&nbsp;vertex&nbsp;`vsw`&nbsp;and&nbsp;whose&nbsp;north-east&nbsp;corner&nbsp;is&nbsp;the
068&nbsp;&nbsp;&nbsp;&nbsp;south-west&nbsp;corner&nbsp;is&nbsp;the&nbsp;vertex&nbsp;`vsw`&nbsp;and&nbsp;whose&nbsp;north-east&nbsp;corner&nbsp;is&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;vertex&nbsp;`vne`.&quot;
069&nbsp;&nbsp;&nbsp;&nbsp;vertex&nbsp;`vne`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;[vsw&nbsp;vne]
070&nbsp;&nbsp;&nbsp;&nbsp;[vsw&nbsp;vne]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;we&nbsp;can&nbsp;actually&nbsp;create&nbsp;any&nbsp;rectangle&nbsp;in&nbsp;the&nbsp;xy&nbsp;plane&nbsp;based&nbsp;on&nbsp;two&nbsp;opposite
071&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;we&nbsp;can&nbsp;actually&nbsp;create&nbsp;any&nbsp;rectangle&nbsp;in&nbsp;the&nbsp;xy&nbsp;plane&nbsp;based&nbsp;on&nbsp;two&nbsp;opposite
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;corners,&nbsp;but&nbsp;the&nbsp;maths&nbsp;are&nbsp;a&nbsp;bit&nbsp;to&nbsp;advanced&nbsp;for&nbsp;me&nbsp;today.&nbsp;TODO:&nbsp;do&nbsp;it!
<span class="covered" title="9 out of 9 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;corners,&nbsp;but&nbsp;the&nbsp;maths&nbsp;are&nbsp;a&nbsp;bit&nbsp;to&nbsp;advanced&nbsp;for&nbsp;me&nbsp;today.&nbsp;TODO:&nbsp;do&nbsp;it!
</span><br/>
<span class="not-covered" title="0 out of 21 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[vnw&nbsp;(vertex&nbsp;(:x&nbsp;(check-vertex&nbsp;vsw))
073&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[vnw&nbsp;(vertex&nbsp;(:x&nbsp;(check-vertex&nbsp;vsw))
</span><br/>
<span class="not-covered" title="0 out of 18 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:y&nbsp;(check-vertex&nbsp;vne))
</span><br/>
<span class="partial" title="9 out of 29 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&#x2F;&nbsp;(reduce&nbsp;+&nbsp;(map&nbsp;#(or&nbsp;(:z&nbsp;%)&nbsp;0)&nbsp;[vsw&nbsp;vne]))&nbsp;2))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vse&nbsp;(vertex&nbsp;(:x&nbsp;vne)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:y&nbsp;vsw)
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:y&nbsp;(check-vertex&nbsp;vne))
</span><br/>
<span class="not-covered" title="0 out of 20 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&#x2F;&nbsp;(reduce&nbsp;+&nbsp;(map&nbsp;#(or&nbsp;(:z&nbsp;%)&nbsp;0)&nbsp;[vsw&nbsp;vne]))&nbsp;2))]
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&#x2F;&nbsp;(reduce&nbsp;+&nbsp;(map&nbsp;#(or&nbsp;(:z&nbsp;%)&nbsp;0)&nbsp;[vsw&nbsp;vne]))&nbsp;2))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vse&nbsp;(vertex&nbsp;(:x&nbsp;vne)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(t&#x2F;tag
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:y&nbsp;vsw)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc
<span class="not-covered" title="0 out of 20 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&#x2F;&nbsp;(reduce&nbsp;+&nbsp;(map&nbsp;#(or&nbsp;(:z&nbsp;%)&nbsp;0)&nbsp;[vsw&nbsp;vne]))&nbsp;2))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(polygon&nbsp;vsw&nbsp;vnw&nbsp;vne&nbsp;vse)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:centre
</span><br/>
<span class="not-covered" title="0 out of 18 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex&nbsp;(+&nbsp;(:x&nbsp;vsw)&nbsp;(&#x2F;&nbsp;(-&nbsp;(:x&nbsp;vne)&nbsp;(:x&nbsp;vsw))&nbsp;2))
</span><br/>
<span class="not-covered" title="0 out of 16 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:x&nbsp;vsw)&nbsp;(&#x2F;&nbsp;(-&nbsp;(:y&nbsp;vne)&nbsp;(:y&nbsp;vsw))&nbsp;2))
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height-order&nbsp;(sort-by&nbsp;:z&nbsp;[vsw&nbsp;vne])]
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:z&nbsp;vse)))
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(t&#x2F;tag
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(polygon&nbsp;vsw&nbsp;vnw&nbsp;vne&nbsp;vse)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:rectangle)))
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:gradient
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
084&nbsp;&nbsp;
<span class="not-covered" title="0 out of 10 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(e&#x2F;unit-vector&nbsp;(e&#x2F;edge&nbsp;(first&nbsp;height-order)&nbsp;(last&nbsp;height-order)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
085&nbsp;&nbsp;;;&nbsp;(rectangle&nbsp;(vertex&nbsp;1&nbsp;2&nbsp;3)&nbsp;(vertex&nbsp;7&nbsp;9&nbsp;4))
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:centre
</span><br/>
<span class="not-covered" title="0 out of 18 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex&nbsp;(+&nbsp;(:x&nbsp;vsw)&nbsp;(&#x2F;&nbsp;(-&nbsp;(:x&nbsp;vne)&nbsp;(:x&nbsp;vsw))&nbsp;2))
</span><br/>
<span class="not-covered" title="0 out of 16 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:x&nbsp;vsw)&nbsp;(&#x2F;&nbsp;(-&nbsp;(:y&nbsp;vne)&nbsp;(:y&nbsp;vsw))&nbsp;2))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:z&nbsp;vse)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:rectangle)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
086&nbsp;&nbsp;
090&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
091&nbsp;&nbsp;;;&nbsp;(rectangle&nbsp;(vertex&nbsp;1&nbsp;2&nbsp;3)&nbsp;(vertex&nbsp;7&nbsp;9&nbsp;4))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
092&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
087&nbsp;&nbsp;(defn&nbsp;gradient
093&nbsp;&nbsp;(defn&nbsp;gradient
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;polygon&nbsp;like&nbsp;`triangle`&nbsp;but&nbsp;with&nbsp;a&nbsp;key&nbsp;`:gradient`&nbsp;whose&nbsp;value&nbsp;is&nbsp;a
094&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;polygon&nbsp;like&nbsp;`triangle`&nbsp;but&nbsp;with&nbsp;a&nbsp;key&nbsp;`:gradient`&nbsp;whose&nbsp;value&nbsp;is&nbsp;a
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;unit&nbsp;vector&nbsp;representing&nbsp;the&nbsp;gradient&nbsp;across&nbsp;`triangle`.&quot;
095&nbsp;&nbsp;&nbsp;&nbsp;unit&nbsp;vector&nbsp;representing&nbsp;the&nbsp;gradient&nbsp;across&nbsp;`triangle`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;[triangle]
096&nbsp;&nbsp;&nbsp;&nbsp;[triangle]
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[order&nbsp;(sort&nbsp;#(max&nbsp;(:z&nbsp;%1)&nbsp;(:z&nbsp;%2))
097&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[order&nbsp;(sort&nbsp;#(max&nbsp;(:z&nbsp;%1)&nbsp;(:z&nbsp;%2))
</span><br/>
<span class="partial" title="8 out of 18 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:vertices&nbsp;(check-triangle&nbsp;triangle)))
098&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:vertices&nbsp;(check-triangle&nbsp;triangle)))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;highest&nbsp;(first&nbsp;order)
099&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;highest&nbsp;(first&nbsp;order)
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowest&nbsp;(last&nbsp;order)]
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowest&nbsp;(last&nbsp;order)]
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc&nbsp;triangle&nbsp;:gradient&nbsp;(e&#x2F;unit-vector&nbsp;(e&#x2F;edge&nbsp;lowest&nbsp;highest)))))
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc&nbsp;triangle&nbsp;:gradient&nbsp;(e&#x2F;unit-vector&nbsp;(e&#x2F;edge&nbsp;lowest&nbsp;highest)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
096&nbsp;&nbsp;
102&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
097&nbsp;&nbsp;(defn&nbsp;triangle-centre
103&nbsp;&nbsp;(defn&nbsp;triangle-centre
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;canonicalised&nbsp;`facet`&nbsp;(i.e.&nbsp;a&nbsp;triangular&nbsp;polygon)&nbsp;with&nbsp;an&nbsp;added
104&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;canonicalised&nbsp;`facet`&nbsp;(i.e.&nbsp;a&nbsp;triangular&nbsp;polygon)&nbsp;with&nbsp;an&nbsp;added
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;key&nbsp;`:centre`&nbsp;whose&nbsp;value&nbsp;represents&nbsp;the&nbsp;centre&nbsp;of&nbsp;this&nbsp;facet&nbsp;in&nbsp;3
105&nbsp;&nbsp;&nbsp;&nbsp;key&nbsp;`:centre`&nbsp;whose&nbsp;value&nbsp;represents&nbsp;the&nbsp;centre&nbsp;of&nbsp;this&nbsp;facet&nbsp;in&nbsp;3
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;dimensions.&nbsp;This&nbsp;only&nbsp;works&nbsp;for&nbsp;triangles,&nbsp;so&nbsp;is&nbsp;here&nbsp;not&nbsp;in
106&nbsp;&nbsp;&nbsp;&nbsp;dimensions.&nbsp;This&nbsp;only&nbsp;works&nbsp;for&nbsp;triangles,&nbsp;so&nbsp;is&nbsp;here&nbsp;not&nbsp;in
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;`walkmap.polygon`.&nbsp;It&nbsp;is&nbsp;an&nbsp;error&nbsp;(although&nbsp;no&nbsp;exception&nbsp;is&nbsp;currently
107&nbsp;&nbsp;&nbsp;&nbsp;`walkmap.polygon`.&nbsp;It&nbsp;is&nbsp;an&nbsp;error&nbsp;(although&nbsp;no&nbsp;exception&nbsp;is&nbsp;currently
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;thrown)&nbsp;if&nbsp;the&nbsp;object&nbsp;past&nbsp;is&nbsp;not&nbsp;a&nbsp;triangular&nbsp;polygon.&quot;
108&nbsp;&nbsp;&nbsp;&nbsp;thrown)&nbsp;if&nbsp;the&nbsp;object&nbsp;past&nbsp;is&nbsp;not&nbsp;a&nbsp;triangular&nbsp;polygon.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;[facet]
109&nbsp;&nbsp;&nbsp;&nbsp;[facet]
</span><br/>
<span class="partial" title="9 out of 19 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[vs&nbsp;(:vertices&nbsp;(check-triangle&nbsp;facet))
110&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[vs&nbsp;(:vertices&nbsp;(check-triangle&nbsp;facet))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v1&nbsp;(first&nbsp;vs)
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v1&nbsp;(first&nbsp;vs)
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opposite&nbsp;(e&#x2F;edge&nbsp;(nth&nbsp;vs&nbsp;1)&nbsp;(nth&nbsp;vs&nbsp;2))
112&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opposite&nbsp;(e&#x2F;edge&nbsp;(nth&nbsp;vs&nbsp;1)&nbsp;(nth&nbsp;vs&nbsp;2))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oc&nbsp;(e&#x2F;centre&nbsp;opposite)]
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oc&nbsp;(e&#x2F;centre&nbsp;opposite)]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
108&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(assoc
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;facet
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;facet
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:centre
116&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:centre
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(vertex
</span><br/>
<span class="covered" title="16 out of 16 forms covered">
112&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:x&nbsp;v1)&nbsp;(*&nbsp;(-&nbsp;(:x&nbsp;oc)&nbsp;(:x&nbsp;v1))&nbsp;2&#x2F;3))
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:x&nbsp;v1)&nbsp;(*&nbsp;(-&nbsp;(:x&nbsp;oc)&nbsp;(:x&nbsp;v1))&nbsp;2&#x2F;3))
</span><br/>
<span class="covered" title="16 out of 16 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:y&nbsp;v1)&nbsp;(*&nbsp;(-&nbsp;(:y&nbsp;oc)&nbsp;(:y&nbsp;v1))&nbsp;2&#x2F;3))
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:y&nbsp;v1)&nbsp;(*&nbsp;(-&nbsp;(:y&nbsp;oc)&nbsp;(:y&nbsp;v1))&nbsp;2&#x2F;3))
</span><br/>
<span class="covered" title="16 out of 16 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:z&nbsp;v1)&nbsp;(*&nbsp;(-&nbsp;(:z&nbsp;oc)&nbsp;(:z&nbsp;v1))&nbsp;2&#x2F;3))))))
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+&nbsp;(:z&nbsp;v1)&nbsp;(*&nbsp;(-&nbsp;(:z&nbsp;oc)&nbsp;(:z&nbsp;v1))&nbsp;2&#x2F;3))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
115&nbsp;&nbsp;
121&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
116&nbsp;&nbsp;(defn&nbsp;centre
122&nbsp;&nbsp;(defn&nbsp;centre
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;[poly]
123&nbsp;&nbsp;&nbsp;&nbsp;[poly]
</span><br/>
<span class="covered" title="22 out of 22 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(count&nbsp;(:vertices&nbsp;(check-polygon&nbsp;poly)))
124&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(count&nbsp;(:vertices&nbsp;(check-polygon&nbsp;poly)))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;(triangle-centre&nbsp;poly)
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;(triangle-centre&nbsp;poly)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;else
126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;else
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
122&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(UnsupportedOperationException.
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(UnsupportedOperationException.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;general&nbsp;case&nbsp;of&nbsp;centre&nbsp;for&nbsp;polygons&nbsp;is&nbsp;not&nbsp;yet&nbsp;implemented.&quot;))))
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;general&nbsp;case&nbsp;of&nbsp;centre&nbsp;for&nbsp;polygons&nbsp;is&nbsp;not&nbsp;yet&nbsp;implemented.&quot;))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
124&nbsp;&nbsp;
130&nbsp;&nbsp;
</span><br/>
<span class="partial" title="4 out of 16 forms covered">
131&nbsp;&nbsp;(defmacro&nbsp;on2dtriangle?
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
132&nbsp;&nbsp;&nbsp;&nbsp;&quot;Is&nbsp;the&nbsp;projection&nbsp;of&nbsp;this&nbsp;`vertex`&nbsp;on&nbsp;the&nbsp;x,&nbsp;y&nbsp;plane&nbsp;within&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
133&nbsp;&nbsp;&nbsp;&nbsp;projection&nbsp;of&nbsp;this&nbsp;triangle&nbsp;on&nbsp;that&nbsp;plane?&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
134&nbsp;&nbsp;&nbsp;&nbsp;[vertex&nbsp;poly]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
135&nbsp;&nbsp;&nbsp;&nbsp;`(not-yet-implemented&nbsp;&quot;on2d?&nbsp;for&nbsp;triangles.&quot;))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
125&nbsp;&nbsp;
136&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
137&nbsp;&nbsp;(defn&nbsp;on2drectangle?
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
138&nbsp;&nbsp;&nbsp;&nbsp;&quot;Is&nbsp;the&nbsp;projection&nbsp;of&nbsp;this&nbsp;`vertex`&nbsp;on&nbsp;the&nbsp;x,&nbsp;y&nbsp;plane&nbsp;within&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
139&nbsp;&nbsp;&nbsp;&nbsp;projection&nbsp;of&nbsp;this&nbsp;rectangle&nbsp;on&nbsp;that&nbsp;plane?&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
140&nbsp;&nbsp;&nbsp;&nbsp;[vertex&nbsp;rectangle]
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
141&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[xo&nbsp;(sort-by&nbsp;:x&nbsp;(:vertices&nbsp;rectangle))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yo&nbsp;(sort-by&nbsp;:x&nbsp;(:vertices&nbsp;rectangle))]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="not-covered" title="0 out of 15 forms covered">
144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&lt;&nbsp;(:x&nbsp;(first&nbsp;xo))&nbsp;(:x&nbsp;vertex)&nbsp;(:x&nbsp;(last&nbsp;xo)))
</span><br/>
<span class="not-covered" title="0 out of 14 forms covered">
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&lt;&nbsp;(:y&nbsp;(first&nbsp;yo))&nbsp;(:y&nbsp;vertex)&nbsp;(:y&nbsp;(last&nbsp;yo))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
146&nbsp;&nbsp;
</span><br/>
<span class="partial" title="4 out of 86 forms covered">
147&nbsp;&nbsp;(defmacro&nbsp;on2d?
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
148&nbsp;&nbsp;&nbsp;&nbsp;&quot;Is&nbsp;the&nbsp;projection&nbsp;of&nbsp;this&nbsp;`vertex`&nbsp;on&nbsp;the&nbsp;x,&nbsp;y&nbsp;plane&nbsp;within&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
149&nbsp;&nbsp;&nbsp;&nbsp;projection&nbsp;of&nbsp;this&nbsp;polygon&nbsp;`poly`&nbsp;on&nbsp;that&nbsp;plane?&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
150&nbsp;&nbsp;&nbsp;&nbsp;[vertex&nbsp;poly]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
151&nbsp;&nbsp;&nbsp;&nbsp;`(cond
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rectangle?&nbsp;~poly)&nbsp;(on2drectangle?&nbsp;~vertex&nbsp;~poly)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(triangle?&nbsp;~poly)&nbsp;(on2dtriangle?&nbsp;~vertex&nbsp;~poly)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(not-yet-implemented&nbsp;&quot;general&nbsp;case&nbsp;of&nbsp;on2d?&nbsp;for&nbsp;polygons.&quot;)))
</span><br/>
</body>
</html>

View file

@ -295,5 +295,14 @@
<span class="not-covered" title="0 out of 7 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(remove&nbsp;nil?&nbsp;(map&nbsp;path-elt-&gt;path&nbsp;paths)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
098&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
099&nbsp;&nbsp;;;&nbsp;(read-svg&nbsp;&quot;resources&#x2F;iom&#x2F;manual_roads.svg&quot;)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
100&nbsp;&nbsp;
</span><br/>
</body>
</html>

View file

@ -11,52 +11,601 @@
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;Finding&nbsp;optimal&nbsp;routes&nbsp;to&nbsp;traverse&nbsp;a&nbsp;map.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[walkmap.path&nbsp;:as&nbsp;p]
003&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[clojure.math.numeric-tower&nbsp;:as&nbsp;m&nbsp;:only&nbsp;[expt]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.polygon&nbsp;:as&nbsp;q]
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.set&nbsp;:refer&nbsp;[intersection]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.stl&nbsp;:as&nbsp;s]
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.edge&nbsp;:as&nbsp;e]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:as&nbsp;u]
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.path&nbsp;:as&nbsp;p]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:as&nbsp;v]))
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.polygon&nbsp;:as&nbsp;q]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.superstructure&nbsp;:as&nbsp;s]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.tag&nbsp;:as&nbsp;t]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.utils&nbsp;:as&nbsp;u]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[walkmap.vertex&nbsp;:as&nbsp;v]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
008&nbsp;&nbsp;
012&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;;;&nbsp;Breadth&nbsp;first&nbsp;search&nbsp;is&nbsp;a&nbsp;good&nbsp;algorithm&nbsp;for&nbsp;terrain&nbsp;in&nbsp;which&nbsp;all&nbsp;steps&nbsp;have
013&nbsp;&nbsp;;;&nbsp;Breadth&nbsp;first&nbsp;search&nbsp;is&nbsp;a&nbsp;good&nbsp;algorithm&nbsp;for&nbsp;terrain&nbsp;in&nbsp;which&nbsp;all&nbsp;steps&nbsp;have
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;;;&nbsp;equal,&nbsp;but&nbsp;in&nbsp;our&nbsp;world&nbsp;(like&nbsp;the&nbsp;real&nbsp;world),&nbsp;they&nbsp;don&#x27;t.
014&nbsp;&nbsp;;;&nbsp;equal,&nbsp;but&nbsp;in&nbsp;our&nbsp;world&nbsp;(like&nbsp;the&nbsp;real&nbsp;world),&nbsp;they&nbsp;don&#x27;t.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
011&nbsp;&nbsp;
015&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;;;&nbsp;Reading&nbsp;list:
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;;;&nbsp;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;A*_search_algorithm
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;;;&nbsp;https:&#x2F;&#x2F;www.redblobgames.com&#x2F;pathfinding&#x2F;a-star&#x2F;introduction.html
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;;;&nbsp;https:&#x2F;&#x2F;faculty.nps.edu&#x2F;ncrowe&#x2F;opmpaper2.htm
016&nbsp;&nbsp;;;&nbsp;Reading&nbsp;list:
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;;;&nbsp;See&nbsp;https:&#x2F;&#x2F;simon-brooke.github.io&#x2F;the-great-game&#x2F;codox&#x2F;Pathmaking.html
018&nbsp;&nbsp;;;&nbsp;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;A*_search_algorithm
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;;;&nbsp;https:&#x2F;&#x2F;www.redblobgames.com&#x2F;pathfinding&#x2F;a-star&#x2F;introduction.html
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;;;&nbsp;https:&#x2F;&#x2F;faculty.nps.edu&#x2F;ncrowe&#x2F;opmpaper2.htm
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;;;&nbsp;See&nbsp;https:&#x2F;&#x2F;simon-brooke.github.io&#x2F;the-great-game&#x2F;codox&#x2F;Pathmaking.html
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
023&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
024&nbsp;&nbsp;(def&nbsp;^:dynamic&nbsp;*gradient-exponent*
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;exponent&nbsp;to&nbsp;be&nbsp;applied&nbsp;to&nbsp;`(inc&nbsp;(:z&nbsp;(unit-vector&nbsp;from&nbsp;to)))`
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;a&nbsp;path&nbsp;segment&nbsp;to&nbsp;calculate&nbsp;the&nbsp;gradient-related&nbsp;part&nbsp;of&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;cost&nbsp;of&nbsp;traversal.&nbsp;Dynamic,&nbsp;because&nbsp;we&nbsp;will&nbsp;want&nbsp;to&nbsp;tune&nbsp;this.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;2)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
029&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
030&nbsp;&nbsp;(def&nbsp;^:dynamic&nbsp;*traversals-exponent*
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;(expected&nbsp;to&nbsp;be&nbsp;negative)&nbsp;exponent&nbsp;to&nbsp;be&nbsp;applied&nbsp;to&nbsp;the&nbsp;number
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;traversals&nbsp;of&nbsp;a&nbsp;path&nbsp;to&nbsp;compute&nbsp;the&nbsp;road&nbsp;bonus.&nbsp;Paths&nbsp;more&nbsp;travelled&nbsp;by
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;should&nbsp;have&nbsp;larger&nbsp;bonuses,&nbsp;but&nbsp;not&nbsp;dramatically&nbsp;so&nbsp;-&nbsp;so&nbsp;the&nbsp;increase&nbsp;in
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;bonus&nbsp;needs&nbsp;to&nbsp;scale&nbsp;significantly&nbsp;less&nbsp;than&nbsp;linearly&nbsp;with&nbsp;the&nbsp;number
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;traversals.&nbsp;Dynamic,&nbsp;because&nbsp;we&nbsp;will&nbsp;want&nbsp;to&nbsp;tune&nbsp;this.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;-2)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
037&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
038&nbsp;&nbsp;(defn&nbsp;traversable?
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;&quot;True&nbsp;if&nbsp;this&nbsp;object&nbsp;can&nbsp;be&nbsp;considered&nbsp;as&nbsp;part&nbsp;of&nbsp;the&nbsp;walkmap.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;[object]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
041&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(q&#x2F;polygon?&nbsp;object)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:centre&nbsp;object))
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(p&#x2F;path?&nbsp;object))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(not&nbsp;(t&#x2F;tagged?&nbsp;object&nbsp;:no-traversal))))
</span><br/>
<span class="blank" title="0 out of 2 forms covered">
048&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
049&nbsp;&nbsp;(declare&nbsp;traversal-cost)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
050&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
051&nbsp;&nbsp;(defn&nbsp;vertices-traversal-cost
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;[vertices&nbsp;s]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;(reduce
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(traversal-cost&nbsp;%1&nbsp;%2&nbsp;s)
</span><br/>
<span class="not-covered" title="0 out of 25 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(v&#x2F;check-vertices&nbsp;vertices)
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rest&nbsp;vertices))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
059&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
060&nbsp;&nbsp;(defn&nbsp;path-traversal-cost
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;[path&nbsp;s]
</span><br/>
<span class="not-covered" title="0 out of 21 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;(vertices-traversal-cost&nbsp;(:vertices&nbsp;(p&#x2F;check-path&nbsp;path))&nbsp;s))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
063&nbsp;&nbsp;
</span><br/>
<span class="partial" title="1 out of 2 forms covered">
064&nbsp;&nbsp;(defn&nbsp;barriers-crossed
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&quot;Search&nbsp;superstructure&nbsp;`s`&nbsp;and&nbsp;return&nbsp;a&nbsp;sequence&nbsp;of&nbsp;barriers,&nbsp;if&nbsp;any,&nbsp;which
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;obstruct&nbsp;traversal&nbsp;from&nbsp;vertex&nbsp;`from`&nbsp;to&nbsp;vertex&nbsp;`to`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;[from&nbsp;to&nbsp;s]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;TODO:&nbsp;implement
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;&#x27;())
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
070&nbsp;&nbsp;
</span><br/>
<span class="partial" title="1 out of 2 forms covered">
071&nbsp;&nbsp;(defn&nbsp;crossing-penalty
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&quot;TODO:&nbsp;should&nbsp;return&nbsp;the&nbsp;cost&nbsp;of&nbsp;crossing&nbsp;this&nbsp;`barrier`,&nbsp;initially&nbsp;mainly
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;watercourse,&nbsp;on&nbsp;the&nbsp;axis&nbsp;from&nbsp;vertex&nbsp;`from`&nbsp;to&nbsp;vertex&nbsp;`to`.&nbsp;in&nbsp;the&nbsp;context
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;superstructure&nbsp;`s`.&nbsp;If&nbsp;there&#x27;s&nbsp;a&nbsp;bridge,&nbsp;ferry&nbsp;or&nbsp;other&nbsp;crossing&nbsp;mechanism
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;`s`&nbsp;at&nbsp;the&nbsp;intersection&nbsp;of&nbsp;the&nbsp;vertex&nbsp;and&nbsp;the&nbsp;barrier,&nbsp;then&nbsp;the&nbsp;penalty
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;should&nbsp;be&nbsp;substantially&nbsp;less&nbsp;than&nbsp;it&nbsp;would&nbsp;otherwise&nbsp;be.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;[barrier&nbsp;from&nbsp;to&nbsp;s]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;TODO:&nbsp;implement
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;0)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
080&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
081&nbsp;&nbsp;(defn&nbsp;gradient-cost
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&quot;Compute&nbsp;the&nbsp;per-unit-distance&nbsp;cost&nbsp;of&nbsp;traversing&nbsp;this&nbsp;`edge`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;[edge]
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[g&nbsp;(:z&nbsp;(e&#x2F;unit-vector&nbsp;edge))]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(pos?&nbsp;g)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(m&#x2F;expt&nbsp;(inc&nbsp;g)&nbsp;*gradient-exponent*)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
088&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;;;&nbsp;(gradient-cost&nbsp;(e&#x2F;edge&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;0&nbsp;0)&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;1&nbsp;0)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;;;&nbsp;(gradient-cost&nbsp;(e&#x2F;edge&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;0&nbsp;0)&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;2&nbsp;0)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
091&nbsp;&nbsp;;;&nbsp;(gradient-cost&nbsp;(e&#x2F;edge&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;0&nbsp;0)&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;1&nbsp;1)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
092&nbsp;&nbsp;;;&nbsp;(gradient-cost&nbsp;(e&#x2F;edge&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;0&nbsp;0)&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;2&nbsp;1)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
093&nbsp;&nbsp;;;&nbsp;(gradient-cost&nbsp;(e&#x2F;edge&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;0&nbsp;0)&nbsp;(v&#x2F;vertex&nbsp;0&nbsp;1&nbsp;0.0001)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
094&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
095&nbsp;&nbsp;(defn&nbsp;best-road
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&quot;Find&nbsp;the&nbsp;best&nbsp;traversable&nbsp;path&nbsp;which&nbsp;links&nbsp;the&nbsp;vertices&nbsp;`from`&nbsp;and&nbsp;`to`
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;in&nbsp;this&nbsp;superstructure&nbsp;`s`,&nbsp;or&nbsp;nil&nbsp;if&nbsp;there&nbsp;are&nbsp;none.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;[from&nbsp;to&nbsp;s]
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[f&nbsp;(fn&nbsp;[v]&nbsp;(set&nbsp;(s&#x2F;touching&nbsp;v&nbsp;p&#x2F;path?&nbsp;s)))]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(first
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(sort-by
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;;&nbsp;I...&nbsp;chose&nbsp;the&nbsp;path&nbsp;more&nbsp;travelled&nbsp;by.
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(or&nbsp;(:traversals&nbsp;%)&nbsp;0)
</span><br/>
<span class="not-covered" title="0 out of 11 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(filter&nbsp;traversable?&nbsp;(intersection&nbsp;(f&nbsp;from)&nbsp;(f&nbsp;to)))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
105&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
106&nbsp;&nbsp;(defn&nbsp;road-bonus
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&quot;Calculate&nbsp;the&nbsp;road&nbsp;bonus&nbsp;of&nbsp;the&nbsp;edge&nbsp;represented&nbsp;by&nbsp;the&nbsp;vertices&nbsp;`from`,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
108&nbsp;&nbsp;&nbsp;&nbsp;`to`,&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;the&nbsp;superstructure&nbsp;`s`.&nbsp;Obviously&nbsp;there&nbsp;only&nbsp;is
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;such&nbsp;a&nbsp;bonus&nbsp;if&nbsp;there&nbsp;actually&nbsp;is&nbsp;an&nbsp;existing&nbsp;thoroughfare&nbsp;to&nbsp;use.&nbsp;Road
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;bonuses&nbsp;scale&nbsp;with&nbsp;some&nbsp;fractional&nbsp;exponent&nbsp;of&nbsp;the&nbsp;number&nbsp;of&nbsp;traversals
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;which&nbsp;have&nbsp;been&nbsp;made&nbsp;of&nbsp;the&nbsp;road&nbsp;segment&nbsp;in&nbsp;question.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
112&nbsp;&nbsp;&nbsp;&nbsp;[from&nbsp;to&nbsp;s]
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[best&nbsp;(best-road&nbsp;from&nbsp;to&nbsp;s)]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when&nbsp;(:traversals&nbsp;best)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(m&#x2F;expt&nbsp;(:traversals&nbsp;best)&nbsp;*traversals-exponent*))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
116&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
117&nbsp;&nbsp;(defn&nbsp;traversal-cost
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;the&nbsp;traversal&nbsp;cost&nbsp;of&nbsp;the&nbsp;edge&nbsp;represented&nbsp;by&nbsp;the&nbsp;vertices&nbsp;`from`,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;`to`,&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;the&nbsp;superstructure&nbsp;`s`.&nbsp;It&nbsp;is&nbsp;legitimate&nbsp;to&nbsp;pass
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;`nil`&nbsp;as&nbsp;the&nbsp;`to`&nbsp;argument,&nbsp;in&nbsp;which&nbsp;case&nbsp;the&nbsp;result&nbsp;will&nbsp;be&nbsp;zero,&nbsp;in&nbsp;order
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
121&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;allow&nbsp;`reduce`&nbsp;to&nbsp;be&nbsp;used&nbsp;to&nbsp;compute&nbsp;total&nbsp;path&nbsp;costs.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
122&nbsp;&nbsp;&nbsp;&nbsp;[from&nbsp;to&nbsp;s]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
123&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(nil?&nbsp;to)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[edge&nbsp;(e&#x2F;edge&nbsp;from&nbsp;to)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;distance&nbsp;(e&#x2F;length&nbsp;edge)]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&#x2F;
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(+
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(*&nbsp;distance
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
130&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(gradient-cost&nbsp;edge))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(reduce&nbsp;+
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
133&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(crossing-penalty&nbsp;[%&nbsp;from&nbsp;to&nbsp;s])
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
134&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(barriers-crossed&nbsp;from&nbsp;to&nbsp;s))))
</span><br/>
<span class="not-covered" title="0 out of 10 forms covered">
135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or&nbsp;(road-bonus&nbsp;from&nbsp;to&nbsp;s)&nbsp;1)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
136&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
137&nbsp;&nbsp;;;&nbsp;(def&nbsp;p&nbsp;&#x27;({:x&nbsp;1.40625,&nbsp;:y&nbsp;0,&nbsp;:kind&nbsp;:vertex,&nbsp;:walkmap.id&#x2F;id&nbsp;:vert_1-40625_0}
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
138&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:x&nbsp;1.40625,&nbsp;:y&nbsp;-10.703125,&nbsp;:kind&nbsp;:vertex,&nbsp;:walkmap.id&#x2F;id&nbsp;:vert_1-40625_-10-703125}
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
139&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:x&nbsp;7.578125,&nbsp;:y&nbsp;-10.703125,&nbsp;:kind&nbsp;:vertex,&nbsp;:walkmap.id&#x2F;id&nbsp;:vert_7-578125_-10-703125}
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
140&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:x&nbsp;7.578125,&nbsp;:y&nbsp;0,&nbsp;:kind&nbsp;:vertex,&nbsp;:walkmap.id&#x2F;id&nbsp;:vert_7-578125_0}
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
141&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:x&nbsp;2.171875,&nbsp;:y&nbsp;-0.765625,&nbsp;:kind&nbsp;:vertex,&nbsp;:walkmap.id&#x2F;id&nbsp;:vert_2-171875_-0-765625}
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
142&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:x&nbsp;6.8125,&nbsp;:y&nbsp;-0.765625,&nbsp;:kind&nbsp;:vertex,&nbsp;:walkmap.id&#x2F;id&nbsp;:vert_6-8125_-0-765625}))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
143&nbsp;&nbsp;;;&nbsp;(v&#x2F;check-vertices&nbsp;p)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
144&nbsp;&nbsp;;;&nbsp;(def&nbsp;p&#x27;&nbsp;(p&#x2F;path&nbsp;p))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
145&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
146&nbsp;&nbsp;;;&nbsp;(traversal-cost&nbsp;(first&nbsp;p)&nbsp;(nth&nbsp;p&nbsp;1)&nbsp;{})
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
147&nbsp;&nbsp;;;&nbsp;(vertices-traversal-cost&nbsp;p&nbsp;{})
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
148&nbsp;&nbsp;;;&nbsp;(path-traversal-cost&nbsp;(p&#x2F;path&nbsp;p))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
149&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
150&nbsp;&nbsp;(defn&nbsp;extend-frontier
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
151&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;sequence&nbsp;like&nbsp;`frontier`&nbsp;with&nbsp;all&nbsp;of&nbsp;these&nbsp;`candidates`&nbsp;which&nbsp;are
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
152&nbsp;&nbsp;&nbsp;&nbsp;not&nbsp;already&nbsp;members&nbsp;either&nbsp;of&nbsp;`frontier`&nbsp;or&nbsp;of&nbsp;`rejects`&nbsp;appended.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
153&nbsp;&nbsp;&nbsp;&nbsp;([frontier&nbsp;candidates]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(extend-frontier&nbsp;frontier&nbsp;candidates&nbsp;nil))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
155&nbsp;&nbsp;&nbsp;&nbsp;([frontier&nbsp;candidates&nbsp;rejects]
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
156&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(empty?&nbsp;frontier)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;candidates
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[fs&nbsp;(set&nbsp;(concat&nbsp;frontier&nbsp;rejects))]
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(concat&nbsp;frontier&nbsp;(remove&nbsp;fs&nbsp;candidates))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
161&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
162&nbsp;&nbsp;;;&nbsp;(extend-frontier&nbsp;&#x27;(1&nbsp;2&nbsp;3&nbsp;4&nbsp;5)&nbsp;&#x27;(7&nbsp;3&nbsp;6&nbsp;2&nbsp;9&nbsp;8)&nbsp;&#x27;(6&nbsp;8))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
163&nbsp;&nbsp;;;&nbsp;(extend-frontier&nbsp;&#x27;(1&nbsp;2&nbsp;3&nbsp;4&nbsp;5)&nbsp;&#x27;(7&nbsp;3&nbsp;6&nbsp;2&nbsp;9&nbsp;8))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
164&nbsp;&nbsp;;;&nbsp;(extend-frontier&nbsp;&#x27;(1&nbsp;2&nbsp;3&nbsp;4&nbsp;5)&nbsp;&#x27;())
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
165&nbsp;&nbsp;;;&nbsp;(extend-frontier&nbsp;&#x27;(1&nbsp;2&nbsp;3&nbsp;4&nbsp;5)&nbsp;nil)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
166&nbsp;&nbsp;;;&nbsp;(extend-frontier&nbsp;nil&nbsp;&#x27;(1&nbsp;2&nbsp;3&nbsp;4&nbsp;5))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
167&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
168&nbsp;&nbsp;(defn&nbsp;route
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
169&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;NOT&nbsp;YET&nbsp;GOOD&nbsp;ENOUGH!&nbsp;Simple&nbsp;breadth&nbsp;first,&nbsp;and&nbsp;although&nbsp;it&nbsp;will
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
170&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;reach&nbsp;the&nbsp;goal
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
171&nbsp;&nbsp;&nbsp;&nbsp;([from&nbsp;to&nbsp;s&nbsp;search-radius]
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(loop&nbsp;[f&nbsp;from
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t&nbsp;to
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
174&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frontier&nbsp;(extend-frontier
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nil
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
176&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(s&#x2F;neighbour-ids
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
177&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(s&#x2F;nearest&nbsp;s&nbsp;from&nbsp;:centre&nbsp;search-radius)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;traversable?
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;visited&nbsp;nil
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;track&nbsp;nil]
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[here&nbsp;(s&#x2F;retrieve&nbsp;(first&nbsp;frontier)&nbsp;s)]
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="not-covered" title="0 out of 11 forms covered">
184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&lt;&nbsp;(e&#x2F;length&nbsp;(e&#x2F;edge&nbsp;(:centre&nbsp;here))&nbsp;to)&nbsp;search-radius)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;close&nbsp;enough
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
186&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(apply&nbsp;p&#x2F;path&nbsp;(cons&nbsp;(:centre&nbsp;here)&nbsp;track))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
187&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(empty?&nbsp;(rest&nbsp;frontier))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;failed
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
189&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nil
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
190&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(recur
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
194&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(extend-frontier
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rest&nbsp;frontier)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(s&#x2F;neighbour-ids&nbsp;here&nbsp;traversable?&nbsp;s)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;visited)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cons&nbsp;here&nbsp;visited)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
199&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;this&nbsp;is&nbsp;going&nbsp;to&nbsp;be&nbsp;wrong,&nbsp;and&nbsp;I&nbsp;need&nbsp;to&nbsp;think&nbsp;about&nbsp;how&nbsp;to&nbsp;fix.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cons&nbsp;here&nbsp;track)))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
201&nbsp;&nbsp;
</span><br/>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -343,5 +343,23 @@
<span class="not-covered" title="0 out of 5 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(printf&nbsp;&quot;Error&nbsp;parsing&nbsp;edn&nbsp;file&nbsp;&#x27;%s&#x27;:&nbsp;%s\n&quot;&nbsp;source&nbsp;(.getMessage&nbsp;e)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
114&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
115&nbsp;&nbsp;(defn&nbsp;not-yet-implemented
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;[message]
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;(throw
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(UnsupportedOperationException.
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Not&nbsp;yet&nbsp;implemented:&nbsp;&quot;&nbsp;message))))
</span><br/>
</body>
</html>