the-great-game/docs/codox/the-great-game.merchants.markets.html
2020-05-26 11:40:16 +01:00

3 lines
11 KiB
HTML

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>the-great-game.merchants.markets documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">The-great-game</span> <span class="project-version">0.1.2-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Baking-the-world.html"><div class="inner"><span>Baking the world</span></div></a></li><li class="depth-1 "><a href="Pathmaking.html"><div class="inner"><span>Pathmaking</span></div></a></li><li class="depth-1 "><a href="Populating-a-game-world.html"><div class="inner"><span>Populating a game world</span></div></a></li><li class="depth-1 "><a href="Settling-a-game-world.html"><div class="inner"><span>Settling a game world</span></div></a></li><li class="depth-1 "><a href="The-spread-of-knowledge-in-a-large-game-world.html"><div class="inner"><span>The spread of knowledge in a large game world</span></div></a></li><li class="depth-1 "><a href="Voice-acting-considered-harmful.html"><div class="inner"><span>Voice acting considered harmful</span></div></a></li><li class="depth-1 "><a href="economy.html"><div class="inner"><span>Game world economy</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to the-great-game</span></div></a></li><li class="depth-1 "><a href="modelling_trading_cost_and_risk.html"><div class="inner"><span>Modelling trading cost and risk</span></div></a></li><li class="depth-1 "><a href="naming-of-characters.html"><div class="inner"><span>Naming of Characters</span></div></a></li><li class="depth-1 "><a href="on-dying.html"><div class="inner"><span>On Dying</span></div></a></li><li class="depth-1 "><a href="orgnic-quests.html"><div class="inner"><span>Organic Quests</span></div></a></li><li class="depth-1 "><a href="sandbox.html"><div class="inner"><span>Sandbox</span></div></a></li><li class="depth-1 "><a href="sexual-dimorphism.html"><div class="inner"><span>Sexual dimorphism</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>the-great-game</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>agent</span></div></div></li><li class="depth-3"><a href="the-great-game.agent.agent.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>agent</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>gossip</span></div></div></li><li class="depth-3 branch"><a href="the-great-game.gossip.gossip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gossip</span></div></a></li><li class="depth-3"><a href="the-great-game.gossip.news-items.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>news-items</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>merchants</span></div></div></li><li class="depth-3 branch current"><a href="the-great-game.merchants.markets.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>markets</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.merchants.merchant-utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>merchant-utils</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.merchants.merchants.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>merchants</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.merchants.planning.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>planning</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>strategies</span></div></div></li><li class="depth-4"><a href="the-great-game.merchants.strategies.simple.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simple</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>objects</span></div></div></li><li class="depth-3 branch"><a href="the-great-game.objects.container.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>container</span></div></a></li><li class="depth-3"><a href="the-great-game.objects.game-object.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>game-object</span></div></a></li><li class="depth-2 branch"><a href="the-great-game.time.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-2 branch"><a href="the-great-game.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>world</span></div></div></li><li class="depth-3 branch"><a href="the-great-game.world.location.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>location</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.world.routes.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>routes</span></div></a></li><li class="depth-3 branch"><a href="the-great-game.world.run.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>run</span></div></a></li><li class="depth-3"><a href="the-great-game.world.world.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>world</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="the-great-game.merchants.markets.html#var-adjust-quantity-and-price"><div class="inner"><span>adjust-quantity-and-price</span></div></a></li><li class="depth-1"><a href="the-great-game.merchants.markets.html#var-new-price"><div class="inner"><span>new-price</span></div></a></li><li class="depth-1"><a href="the-great-game.merchants.markets.html#var-run"><div class="inner"><span>run</span></div></a></li><li class="depth-1"><a href="the-great-game.merchants.markets.html#var-update-markets"><div class="inner"><span>update-markets</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">the-great-game.merchants.markets</h1><div class="doc"><div class="markdown"><p>Adjusting quantities and prices in markets.</p></div></div><div class="public anchor" id="var-adjust-quantity-and-price"><h3>adjust-quantity-and-price</h3><div class="usage"><code>(adjust-quantity-and-price world city commodity)</code></div><div class="doc"><div class="markdown"><p>Adjust the quantity of this <code>commodity</code> currently in stock in this <code>city</code> of this <code>world</code>. Return a fragmentary world which can be deep-merged into this world.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/merchants/markets.clj#L17">view source</a></div></div><div class="public anchor" id="var-new-price"><h3>new-price</h3><div class="usage"><code>(new-price old stock supply demand)</code></div><div class="doc"><div class="markdown"><p>If <code>stock</code> is greater than the maximum of <code>supply</code> and <code>demand</code>, then there is surplus and <code>old</code> price is too high, so shold be reduced. If lower, then it is too low and should be increased.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/merchants/markets.clj#L6">view source</a></div></div><div class="public anchor" id="var-run"><h3>run</h3><div class="usage"><code>(run world)</code></div><div class="doc"><div class="markdown"><p>Return a world like this <code>world</code>, with quantities and prices in markets updated to reflect supply and demand.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/merchants/markets.clj#L79">view source</a></div></div><div class="public anchor" id="var-update-markets"><h3>update-markets</h3><div class="usage"><code>(update-markets world)</code><code>(update-markets world city)</code><code>(update-markets world city commodity)</code></div><div class="doc"><div class="markdown"><p>Return a world like this <code>world</code>, with quantities and prices in markets updated to reflect supply and demand. If <code>city</code> or <code>city</code> and <code>commodity</code> are specified, return a fragmentary world with only the changes for that <code>city</code> (and <code>commodity</code> if specified) populated.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/merchants/markets.clj#L57">view source</a></div></div></div></body></html>