<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="../../../../coverage.css"/> <title> cc/journeyman/the_great_game/location/location.clj </title> </head> <body> <span class="covered" title="1 out of 1 forms covered"> 001 (ns cc.journeyman.the-great-game.location.location) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 002 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 003 ;;; There's probably conflict between this sense of a reified location and </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 004 ;;; the simpler sense of a location described in </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 005 ;;; `cc.journeyman.the-great-game.world.location`, q.v. This needs to </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 006 ;;; be resolved! </span><br/> <span class="blank" title="0 out of 0 forms covered"> 007 </span><br/> <span class="covered" title="1 out of 1 forms covered"> 008 (defprotocol ProtoLocation </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 009 (easting [location] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 010 "Return the easting of this location") </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 011 (northing [location] "Return the northing of this location") </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 012 (altitude [location] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 013 "Return the absolute altitude of this location, which may be </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 014 different from the terrain height at this location, if, for </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 015 example, the location is underground or on an upper floor.") </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 016 (terrain-altitude [location] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 017 "Return the 'ground level' (altitude of the terrain) </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 018 at this location given this world. TODO: possibly </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 019 terrain-altitude should be a method of the world.") </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 020 (settlement [location] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 021 "Return the settlement record of the settlement in this world </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 022 within whose parish polygon this location exists, or if none </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 023 whose centre (inn location) is closest to this location")) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 024 </span><br/> <span class="blank" title="0 out of 0 forms covered"> 025 </span><br/> <span class="covered" title="1 out of 1 forms covered"> 026 (defrecord Location [^Double easting ^Double northing ^Double altitude world] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 027 ProtoLocation </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> 028 (easting [l] (:easting l)) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> 029 (northing [l] (:northing l)) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> 030 (altitude [l] (:altitude l)) </span><br/> <span class="not-covered" title="0 out of 1 forms covered"> 031 (terrain-altitude [l] 0.0) ;; TODO </span><br/> <span class="not-covered" title="0 out of 1 forms covered"> 032 (settlement [l] :tchahua)) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 033 </span><br/> <span class="covered" title="1 out of 1 forms covered"> 034 (defrecord OrientedLocation </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 035 ;; "Identical to a Location except having, additionally, an orientation" </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 036 [^Double easting ^Double northing ^Double altitude ^Double orientation world] </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 037 ProtoLocation </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> 038 (easting [l] (:easting l)) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> 039 (northing [l] (:northing l)) </span><br/> <span class="not-covered" title="0 out of 3 forms covered"> 040 (altitude [l] (:altitude l)) </span><br/> <span class="not-covered" title="0 out of 1 forms covered"> 041 (terrain-altitude [l] 0.0) ;; TODO </span><br/> <span class="not-covered" title="0 out of 1 forms covered"> 042 (settlement [l] :tchahua)) ;; TODO </span><br/> <span class="blank" title="0 out of 0 forms covered"> 043 </span><br/> <span class="not-tracked" title="0 out of 0 forms covered"> 044 ;; (.settlement (OrientedLocation. 123.45 543.76 12.34 0.00 {})) </span><br/> <span class="blank" title="0 out of 0 forms covered"> 045 </span><br/> </body> </html>