585 lines
37 KiB
HTML
585 lines
37 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link rel="stylesheet" href="../../coverage.css"/> <title> the_great_game/world/world.clj </title>
|
|
</head>
|
|
<body>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
001 (ns the-great-game.world.world
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
002 "Access to data about the world")
|
|
</span><br/>
|
|
<span class="blank" title="0 out of 0 forms covered">
|
|
003
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
004 ;;; The world has to work either as map or a database. Initially, and for
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
005 ;;; unit tests, I'll use a map; later, there will be a database. But the
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
006 ;;; API needs to be agnostic, so that heirarchies which interact with
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
007 ;;; `world` don't have to know which they've got - as far as they're concerned
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
008 ;;; it's just a handle.
|
|
</span><br/>
|
|
<span class="blank" title="0 out of 0 forms covered">
|
|
009
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
010 (def default-world
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
011 "A basic world for testing concepts"
|
|
</span><br/>
|
|
<span class="covered" title="7 out of 7 forms covered">
|
|
012 {:date 0 ;; the age of this world in game days
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
013 :cities
|
|
</span><br/>
|
|
<span class="covered" title="8 out of 8 forms covered">
|
|
014 {:aberdeen
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
015 {:id :aberdeen
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
016 :supplies
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
017 ;; `supplies` is the quantity of each commodity added to the stock
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
018 ;; each game day. If the price in the market is lower than 1 (the
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
019 ;; cost of production of a unit) no goods will be added.
|
|
</span><br/>
|
|
<span class="covered" title="5 out of 5 forms covered">
|
|
020 {:fish 10
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
021 :leather 5}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
022 :demands
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
023 ;; `stock` is the quantity of each commodity in the market at any
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
024 ;; given time. It is adjusted for production and consumption at
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
025 ;; the end of each game day.
|
|
</span><br/>
|
|
<span class="covered" title="7 out of 7 forms covered">
|
|
026 {:iron 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
027 :cloth 10
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
028 :whisky 10}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
029 :port true
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
030 :prices
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
031 ;; `prices`: the current price (both buying and selling, for simplicity)
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
032 ;; of each commodity in the market. Updated each game day based on current
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
033 ;; stock.
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
034 {:cloth 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
035 :fish 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
036 :leather 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
037 :iron 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
038 :whisky 1}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
039 :stock
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
040 ;; `stock` is the quantity of each commodity in the market at any
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
041 ;; given time. It is adjusted for production and consumption at
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
042 ;; the end of each game day.
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
043 {:cloth 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
044 :fish 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
045 :leather 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
046 :iron 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
047 :whisky 0}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
048 :cash 100}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
049 :buckie
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
050 {:id :buckie
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
051 :supplies
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
052 {:fish 20}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
053 :demands
|
|
</span><br/>
|
|
<span class="covered" title="9 out of 9 forms covered">
|
|
054 {:cloth 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
055 :leather 3
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
056 :whisky 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
057 :iron 1}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
058 :port true
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
059 :prices {:cloth 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
060 :fish 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
061 :leather 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
062 :iron 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
063 :whisky 1}
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
064 :stock {:cloth 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
065 :fish 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
066 :leather 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
067 :iron 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
068 :whisky 0}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
069 :cash 100}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
070 :callander
|
|
</span><br/>
|
|
<span class="covered" title="9 out of 9 forms covered">
|
|
071 {:id :callander
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
072 :supplies {:leather 20}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
073 :demands
|
|
</span><br/>
|
|
<span class="covered" title="9 out of 9 forms covered">
|
|
074 {:cloth 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
075 :fish 3
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
076 :whisky 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
077 :iron 1}
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
078 :prices {:cloth 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
079 :fish 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
080 :leather 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
081 :iron 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
082 :whisky 1}
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
083 :stock {:cloth 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
084 :fish 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
085 :leather 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
086 :iron 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
087 :whisky 0}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
088 :cash 100}
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
089 :dundee {:id :dundee}
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
090 :edinburgh {:id :dundee}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
091 :falkirk
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
092 {:id :falkirk
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
093 :supplies {:iron 10}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
094 :demands
|
|
</span><br/>
|
|
<span class="covered" title="9 out of 9 forms covered">
|
|
095 {:cloth 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
096 :leather 3
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
097 :whisky 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
098 :fish 10}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
099 :port true
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
100 :prices {:cloth 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
101 :fish 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
102 :leather 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
103 :iron 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
104 :whisky 1}
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
105 :stock {:cloth 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
106 :fish 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
107 :leather 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
108 :iron 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
109 :whisky 0}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
110 :cash 100}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
111 :glasgow
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
112 {:id :glasgow
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
113 :supplies {:whisky 10}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
114 :demands
|
|
</span><br/>
|
|
<span class="covered" title="9 out of 9 forms covered">
|
|
115 {:cloth 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
116 :leather 3
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
117 :iron 5
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
118 :fish 10}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
119 :port true
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
120 :prices {:cloth 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
121 :fish 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
122 :leather 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
123 :iron 1
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
124 :whisky 1}
|
|
</span><br/>
|
|
<span class="covered" title="11 out of 11 forms covered">
|
|
125 :stock {:cloth 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
126 :fish 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
127 :leather 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
128 :iron 0
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
129 :whisky 0}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
130 :cash 100}}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
131 :merchants
|
|
</span><br/>
|
|
<span class="covered" title="20 out of 20 forms covered">
|
|
132 {:archie {:id :archie
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
133 :home :aberdeen :location :aberdeen :cash 100 :capacity 10
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
134 :known-prices {}
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
135 :stock {}}
|
|
</span><br/>
|
|
<span class="covered" title="13 out of 13 forms covered">
|
|
136 :belinda {:id :belinda
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
137 :home :buckie :location :buckie :cash 100 :capacity 10
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
138 :known-prices {}
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
139 :stock {}}
|
|
</span><br/>
|
|
<span class="covered" title="13 out of 13 forms covered">
|
|
140 :callum {:id :callum
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
141 :home :callander :location :calander :cash 100 :capacity 10
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
142 :known-prices {}
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
143 :stock {}}
|
|
</span><br/>
|
|
<span class="covered" title="13 out of 13 forms covered">
|
|
144 :deirdre {:id :deidre
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
145 :home :dundee :location :dundee :cash 100 :capacity 10
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
146 :known-prices {}
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
147 :stock {}}
|
|
</span><br/>
|
|
<span class="covered" title="13 out of 13 forms covered">
|
|
148 :euan {:id :euan
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
149 :home :edinbirgh :location :edinburgh :cash 100 :capacity 10
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
150 :known-prices {}
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
151 :stock {}}
|
|
</span><br/>
|
|
<span class="covered" title="13 out of 13 forms covered">
|
|
152 :fiona {:id :fiona
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
153 :home :falkirk :location :falkirk :cash 100 :capacity 10
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
154 :known-prices {}
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
155 :stock {}}}
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
156 :routes
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
157 ;; all routes can be traversed in either direction and are assumed to
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
158 ;; take the same amount of time.
|
|
</span><br/>
|
|
<span class="covered" title="4 out of 4 forms covered">
|
|
159 [[:aberdeen :buckie]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
160 [:aberdeen :dundee]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
161 [:callander :glasgow]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
162 [:dundee :callander]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
163 [:dundee :edinburgh]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
164 [:dundee :falkirk]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
165 [:edinburgh :falkirk]
|
|
</span><br/>
|
|
<span class="covered" title="3 out of 3 forms covered">
|
|
166 [:falkirk :glasgow]]
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
167 :commodities
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
168 ;; cost of commodities is expressed in person/days;
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
169 ;; weight in packhorse loads. Transport in this model
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
170 ;; is all overland; you don't take bulk cargoes overland
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
171 ;; in this period, it's too expensive.
|
|
</span><br/>
|
|
<span class="covered" title="13 out of 13 forms covered">
|
|
172 {:cloth {:id :cloth :cost 1 :weight 0.25}
|
|
</span><br/>
|
|
<span class="covered" title="7 out of 7 forms covered">
|
|
173 :fish {:id :fish :cost 1 :weight 1}
|
|
</span><br/>
|
|
<span class="covered" title="7 out of 7 forms covered">
|
|
174 :leather {:id :leather :cost 1 :weight 0.5}
|
|
</span><br/>
|
|
<span class="covered" title="7 out of 7 forms covered">
|
|
175 :whisky {:id :whisky :cost 1 :weight 0.1}
|
|
</span><br/>
|
|
<span class="covered" title="7 out of 7 forms covered">
|
|
176 :iron {:id :iron :cost 1 :weight 10}}})
|
|
</span><br/>
|
|
<span class="blank" title="0 out of 0 forms covered">
|
|
177
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
178 (defn actual-price
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
179 "Find the actual current price of this `commodity` in this `city` given
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
180 this `world`. **NOTE** that merchants can only know the actual prices in
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
181 the city in which they are currently located."
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
182 [world commodity city]
|
|
</span><br/>
|
|
<span class="covered" title="9 out of 9 forms covered">
|
|
183 (-> world :cities city :prices commodity))
|
|
</span><br/>
|
|
<span class="blank" title="0 out of 0 forms covered">
|
|
184
|
|
</span><br/>
|
|
<span class="covered" title="1 out of 1 forms covered">
|
|
185 (defn run
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
186 "Return a world like this `world` with only the `:date` to this `date`
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
187 (or id `date` not supplied, the current value incremented by one). For
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
188 running other aspects of the simulation, see [[the-great-game.world.run]]."
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
189 ([world]
|
|
</span><br/>
|
|
<span class="not-covered" title="0 out of 12 forms covered">
|
|
190 (run world (inc (or (:date world) 0))))
|
|
</span><br/>
|
|
<span class="not-tracked" title="0 out of 0 forms covered">
|
|
191 ([world date]
|
|
</span><br/>
|
|
<span class="not-covered" title="0 out of 5 forms covered">
|
|
192 (assoc world :date date)))
|
|
</span><br/>
|
|
</body>
|
|
</html>
|