3 lines
17 KiB
HTML
3 lines
17 KiB
HTML
<!DOCTYPE html PUBLIC ""
|
||
"">
|
||
<html><head><meta charset="UTF-8" /><title>the-great-game.time 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.1</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="Game_Play.html"><div class="inner"><span>Game Play</span></div></a></li><li class="depth-1 "><a href="Gossip_scripted_plot_and_Johnny_Silverhand.html"><div class="inner"><span>Gossip, scripted plot, and Johnny Silverhand</span></div></a></li><li class="depth-1 "><a href="Organic_Quests.html"><div class="inner"><span>Organic Quests</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="Simulation-layers.html"><div class="inner"><span>Simulation layers</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="Uncanny_dialogue.html"><div class="inner"><span>The Uncanny Valley, and dynamically generated dialogue</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="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"><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 branch current"><a href="the-great-game.time.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></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.time.html#var-canonical-ordering-of-houses"><div class="inner"><span>canonical-ordering-of-houses</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-date-string"><div class="inner"><span>date-string</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-day"><div class="inner"><span>day</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-day-of-year"><div class="inner"><span>day-of-year</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-days-in-season"><div class="inner"><span>days-in-season</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-days-in-week"><div class="inner"><span>days-in-week</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-days-of-week"><div class="inner"><span>days-of-week</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-game-day-length"><div class="inner"><span>game-day-length</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-game-start-time"><div class="inner"><span>game-start-time</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-game-time"><div class="inner"><span>game-time</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-now"><div class="inner"><span>now</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-season"><div class="inner"><span>season</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-seasons-in-year"><div class="inner"><span>seasons-in-year</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-seasons-of-year"><div class="inner"><span>seasons-of-year</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-waiting-day.3F"><div class="inner"><span>waiting-day?</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-week"><div class="inner"><span>week</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-weeks-in-season"><div class="inner"><span>weeks-in-season</span></div></a></li><li class="depth-1"><a href="the-great-game.time.html#var-weeks-of-season"><div class="inner"><span>weeks-of-season</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">the-great-game.time</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-canonical-ordering-of-houses"><h3>canonical-ordering-of-houses</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The canonical ordering of religious houses.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L26">view source</a></div></div><div class="public anchor" id="var-date-string"><h3>date-string</h3><div class="usage"><code>(date-string game-time)</code></div><div class="doc"><div class="markdown"><p>Return a correctly formatted date for this <code>game-time</code> in the calendar of the Great Place.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L124">view source</a></div></div><div class="public anchor" id="var-day"><h3>day</h3><div class="usage"><code>(day game-time)</code></div><div class="doc"><div class="markdown"><p>Day of the eight-day week represented by this <code>game-time</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L100">view source</a></div></div><div class="public anchor" id="var-day-of-year"><h3>day-of-year</h3><h4 class="type">macro</h4><div class="usage"><code>(day-of-year game-time)</code></div><div class="doc"><div class="markdown"><p>The day of the year represented by this <code>game-time</code>, ignoring leap years.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L85">view source</a></div></div><div class="public anchor" id="var-days-in-season"><h3>days-in-season</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L75">view source</a></div></div><div class="public anchor" id="var-days-in-week"><h3>days-in-week</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>This world has an eight day week.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L43">view source</a></div></div><div class="public anchor" id="var-days-of-week"><h3>days-of-week</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The eight-day week of the game world. This differs from the canonical ordering of houses in that it omits the eye.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L38">view source</a></div></div><div class="public anchor" id="var-game-day-length"><h3>game-day-length</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The Java clock advances in milliseconds, which is fine. But we need game-days to be shorter than real world days. A Witcher 3 game day is 1 hour 36 minutes, or 96 minutes, which is presumably researched. Round it up to 100 minutes for easier calculation.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L8">view source</a></div></div><div class="public anchor" id="var-game-start-time"><h3>game-start-time</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The start time of this run.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L4">view source</a></div></div><div class="public anchor" id="var-game-time"><h3>game-time</h3><div class="usage"><code>(game-time)</code><code>(game-time timestamp)</code></div><div class="doc"><div class="markdown"><p>With no arguments, the current game time. If a Java <code>timestamp</code> value is passed (as a <code>long</code>), the game time represented by that value.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L78">view source</a></div></div><div class="public anchor" id="var-now"><h3>now</h3><div class="usage"><code>(now)</code></div><div class="doc"><div class="markdown"><p>For now, we’ll use Java timestamp for time; ultimately, we need a concept of game-time which allows us to drive day/night cycle, seasons, et cetera, but what matters about time is that it is a value which increases.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L18">view source</a></div></div><div class="public anchor" id="var-season"><h3>season</h3><div class="usage"><code>(season game-time)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L117">view source</a></div></div><div class="public anchor" id="var-seasons-in-year"><h3>seasons-in-year</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Nine seasons in a year, one for each house (although the order is different.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L60">view source</a></div></div><div class="public anchor" id="var-seasons-of-year"><h3>seasons-of-year</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The ordering of seasons in the year is different from the canonical ordering of the houses, for reasons of the agricultural cycle.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L47">view source</a></div></div><div class="public anchor" id="var-waiting-day.3F"><h3>waiting-day?</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Does this <code>game-time</code> represent a waiting day?</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L90">view source</a></div></div><div class="public anchor" id="var-week"><h3>week</h3><div class="usage"><code>(week game-time)</code></div><div class="doc"><div class="markdown"><p>Week of season represented by this <code>game-time</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L108">view source</a></div></div><div class="public anchor" id="var-weeks-in-season"><h3>weeks-in-season</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>To fit nine seasons of eight day weeks into 365 days, each must be of five weeks.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L70">view source</a></div></div><div class="public anchor" id="var-weeks-of-season"><h3>weeks-of-season</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>To fit nine seasons of eight day weeks into 365 days, each must be of five weeks.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/the-great-game/blob/master/src/the_great_game/time.clj#L65">view source</a></div></div></div></body></html> |