This commit is contained in:
dabreegster 2020-11-29 00:26:18 +00:00
parent e349bec3ba
commit a219eed6cb
14 changed files with 156 additions and 41 deletions

View File

@ -3,4 +3,4 @@
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../experiment/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate experiment</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span>
</span>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='animation/struct.Animator.html'>animation::Animator</a></li><li><a href='animation/struct.Effect.html'>animation::Effect</a></li><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='controls/struct.RotateController.html'>controls::RotateController</a></li><li><a href='game/struct.Config.html'>game::Config</a></li><li><a href='game/struct.Game.html'>game::Game</a></li><li><a href='game/struct.OverBldg.html'>game::OverBldg</a></li><li><a href='game/struct.SleighState.html'>game::SleighState</a></li><li><a href='upzone/struct.Picker.html'>upzone::Picker</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='game/enum.BldgState.html'>game::BldgState</a></li></ul><h3 id='Traits'>Traits</h3><ul class='traits docblock'><li><a href='controls/trait.Controller.html'>controls::Controller</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='fn.main.html'>main</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='controls/constant.HACK.html'>controls::HACK</a></li><li><a href='game/constant.ZOOM.html'>game::ZOOM</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='animation/struct.Animator.html'>animation::Animator</a></li><li><a href='animation/struct.Effect.html'>animation::Effect</a></li><li><a href='controls/struct.InstantController.html'>controls::InstantController</a></li><li><a href='controls/struct.RotateController.html'>controls::RotateController</a></li><li><a href='game/struct.Config.html'>game::Config</a></li><li><a href='game/struct.Game.html'>game::Game</a></li><li><a href='game/struct.OverBldg.html'>game::OverBldg</a></li><li><a href='game/struct.SleighState.html'>game::SleighState</a></li><li><a href='upzone/struct.Picker.html'>upzone::Picker</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='game/enum.BldgState.html'>game::BldgState</a></li></ul><h3 id='Traits'>Traits</h3><ul class='traits docblock'><li><a href='controls/trait.Controller.html'>controls::Controller</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='game/fn.make_bar.html'>game::make_bar</a></li><li><a href='fn.main.html'>main</a></li></ul><h3 id='Constants'>Constants</h3><ul class='constants docblock'><li><a href='controls/constant.HACK.html'>controls::HACK</a></li><li><a href='game/constant.ZOOM.html'>game::ZOOM</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "experiment";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `ZOOM` constant in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, ZOOM"><title>experiment::game::ZOOM - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'ZOOM', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#16' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="constant" href=''>ZOOM</a></span></h1><pre class='rust const'>const ZOOM: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 10.0;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#17' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="constant" href=''>ZOOM</a></span></h1><pre class='rust const'>const ZOOM: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a> = 10.0;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BldgState` enum in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, BldgState"><title>experiment::game::BldgState - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Enum BldgState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#variants">Variants</a><div class="sidebar-links"><a href="#variant.Depot">Depot</a><a href="#variant.Done">Done</a><a href="#variant.Undelivered">Undelivered</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'BldgState', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#435-439' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="enum" href=''>BldgState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>enum BldgState {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#450-454' title='goto source code'>[src]</a></span><span class='in-band'>Enum <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="enum" href=''>BldgState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust enum'>enum BldgState {
Undelivered {
score: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>,
cost: <a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a>,
@ -10,7 +10,7 @@
Done,
}</pre></div><h2 id='variants' class='variants small-section-header'>
Variants<a href='#variants' class='anchor'></a></h2>
<div id="variant.Undelivered" class="variant small-section-header"><a href="#variant.Undelivered" class="anchor field"></a><code>Undelivered</code></div><div class='autohide sub-variant' id='variant.Undelivered.fields'><h3>Fields of <b>Undelivered</b></h3><div><span id="variant.Undelivered.field.score" class="variant small-section-header"><a href="#variant.Undelivered.field.score" class="anchor field"></a><code>score:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="variant.Undelivered.field.cost" class="variant small-section-header"><a href="#variant.Undelivered.field.cost" class="anchor field"></a><code>cost:&nbsp;<a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code></span></div></div><div id="variant.Depot" class="variant small-section-header"><a href="#variant.Depot" class="anchor field"></a><code>Depot</code></div><div id="variant.Done" class="variant small-section-header"><a href="#variant.Done" class="anchor field"></a><code>Done</code></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/experiment/game.rs.html#434' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a class='srclink' href='../../src/experiment/game.rs.html#434' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
<div id="variant.Undelivered" class="variant small-section-header"><a href="#variant.Undelivered" class="anchor field"></a><code>Undelivered</code></div><div class='autohide sub-variant' id='variant.Undelivered.fields'><h3>Fields of <b>Undelivered</b></h3><div><span id="variant.Undelivered.field.score" class="variant small-section-header"><a href="#variant.Undelivered.field.score" class="anchor field"></a><code>score:&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code></span><span id="variant.Undelivered.field.cost" class="variant small-section-header"><a href="#variant.Undelivered.field.cost" class="anchor field"></a><code>cost:&nbsp;<a class="struct" href="../../geom/duration/struct.Duration.html" title="struct geom::duration::Duration">Duration</a></code></span></div></div><div id="variant.Depot" class="variant small-section-header"><a href="#variant.Depot" class="anchor field"></a><code>Depot</code></div><div id="variant.Done" class="variant small-section-header"><a href="#variant.Done" class="anchor field"></a><code>Done</code></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-Clone' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Clone' class='anchor'></a><a class='srclink' href='../../src/experiment/game.rs.html#449' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.clone' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a class='srclink' href='../../src/experiment/game.rs.html#449' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id='method.clone_from' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class='since' title='Stable since Rust version 1.0.0'>1.0.0</span><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="enum" href="../../experiment/game/enum.BldgState.html" title="enum experiment::game::BldgState">BldgState</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id='impl-Borrow%3CT%3E' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Borrow%3CT%3E' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.borrow' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow' class='fnname'>borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>

View File

@ -0,0 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `make_bar` fn in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, make_bar"><title>experiment::game::make_bar - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'make_bar', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#485-523' title='goto source code'>[src]</a></span><span class='in-band'>Function <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="fn" href=''>make_bar</a></span></h1><pre class='rust fn'>fn make_bar(ctx: &amp;mut EventCtx&lt;'_&gt;, pct_full: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, scale: <a class="struct" href="../../map_gui/tools/colors/struct.ColorScale.html" title="struct map_gui::tools::colors::ColorScale">ColorScale</a>) -&gt; Widget</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,7 +1,8 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `game` mod in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, game"><title>experiment::game - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'game', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-468' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module game</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#functions">Functions</a></li></ul></div><p class='location'><a href='../index.html'>experiment</a></p><script>window.sidebarCurrent = {name: 'game', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#1-523' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>experiment</a>::<wbr><a class="mod" href=''>game</a></span></h1><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.Config.html" title='experiment::game::Config struct'>Config</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.Game.html" title='experiment::game::Game struct'>Game</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.OverBldg.html" title='experiment::game::OverBldg struct'>OverBldg</a></td><td class='docblock-short'></td></tr><tr class='module-item'><td><a class="struct" href="struct.SleighState.html" title='experiment::game::SleighState struct'>SleighState</a></td><td class='docblock-short'></td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.BldgState.html" title='experiment::game::BldgState enum'>BldgState</a></td><td class='docblock-short'></td></tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2>
<table><tr class='module-item'><td><a class="constant" href="constant.ZOOM.html" title='experiment::game::ZOOM constant'>ZOOM</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<table><tr class='module-item'><td><a class="constant" href="constant.ZOOM.html" title='experiment::game::ZOOM constant'>ZOOM</a></td><td class='docblock-short'></td></tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2>
<table><tr class='module-item'><td><a class="fn" href="fn.make_bar.html" title='experiment::game::make_bar fn'>make_bar</a></td><td class='docblock-short'></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1 +1 @@
initSidebarItems({"constant":[["ZOOM",""]],"enum":[["BldgState",""]],"struct":[["Config",""],["Game",""],["OverBldg",""],["SleighState",""]]});
initSidebarItems({"constant":[["ZOOM",""]],"enum":[["BldgState",""]],"fn":[["make_bar",""]],"struct":[["Config",""],["Game",""],["OverBldg",""],["SleighState",""]]});

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Config` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, Config"><title>experiment::game::Config - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../experiment/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Struct Config</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_energy">max_energy</a><a href="#structfield.normal_speed">normal_speed</a><a href="#structfield.recharge_rate">recharge_rate</a><a href="#structfield.tired_speed">tired_speed</a><a href="#structfield.upzone_rate">upzone_rate</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class='location'><a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a></p><script>window.sidebarCurrent = {name: 'Config', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#264-270' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="struct" href=''>Config</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct Config {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/experiment/game.rs.html#276-282' title='goto source code'>[src]</a></span><span class='in-band'>Struct <a href='../index.html'>experiment</a>::<wbr><a href='index.html'>game</a>::<wbr><a class="struct" href=''>Config</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct Config {
normal_speed: <a class="struct" href="../../geom/speed/struct.Speed.html" title="struct geom::speed::Speed">Speed</a>,
tired_speed: <a class="struct" href="../../geom/speed/struct.Speed.html" title="struct geom::speed::Speed">Speed</a>,
recharge_rate: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class='location'><a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a></p><script>window.sidebarCurrent = {name: 'BUILT_TIME_UTC', ty: 'constant', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-dbd8f61b42b849fa/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sat, 28 Nov 2020 18:36:15 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-dbd8f61b42b849fa/out/built.rs.html#49' title='goto source code'>[src]</a></span><span class='in-band'>Constant <a href='../../index.html'>game</a>::<wbr><a href='../index.html'>pregame</a>::<wbr><a href='index.html'>built_info</a>::<wbr><a class="constant" href=''>BUILT_TIME_UTC</a></span></h1><pre class='rust const'>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sun, 29 Nov 2020 00:23:58 +0000&quot;;</pre><div class='docblock'><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -469,17 +469,73 @@
<span id="466">466</span>
<span id="467">467</span>
<span id="468">468</span>
<span id="469">469</span>
<span id="470">470</span>
<span id="471">471</span>
<span id="472">472</span>
<span id="473">473</span>
<span id="474">474</span>
<span id="475">475</span>
<span id="476">476</span>
<span id="477">477</span>
<span id="478">478</span>
<span id="479">479</span>
<span id="480">480</span>
<span id="481">481</span>
<span id="482">482</span>
<span id="483">483</span>
<span id="484">484</span>
<span id="485">485</span>
<span id="486">486</span>
<span id="487">487</span>
<span id="488">488</span>
<span id="489">489</span>
<span id="490">490</span>
<span id="491">491</span>
<span id="492">492</span>
<span id="493">493</span>
<span id="494">494</span>
<span id="495">495</span>
<span id="496">496</span>
<span id="497">497</span>
<span id="498">498</span>
<span id="499">499</span>
<span id="500">500</span>
<span id="501">501</span>
<span id="502">502</span>
<span id="503">503</span>
<span id="504">504</span>
<span id="505">505</span>
<span id="506">506</span>
<span id="507">507</span>
<span id="508">508</span>
<span id="509">509</span>
<span id="510">510</span>
<span id="511">511</span>
<span id="512">512</span>
<span id="513">513</span>
<span id="514">514</span>
<span id="515">515</span>
<span id="516">516</span>
<span id="517">517</span>
<span id="518">518</span>
<span id="519">519</span>
<span id="520">520</span>
<span id="521">521</span>
<span id="522">522</span>
<span id="523">523</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashMap</span>;
<span class="kw">use</span> <span class="ident">abstutil</span>::{<span class="ident">prettyprint_usize</span>, <span class="ident">Timer</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Pt2D</span>, <span class="ident">Speed</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">nice_map_name</span>, <span class="ident">CityPicker</span>, <span class="ident">SimpleMinimap</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Line</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Speed</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{<span class="ident">nice_map_name</span>, <span class="ident">CityPicker</span>, <span class="ident">ColorScale</span>, <span class="ident">SimpleMinimap</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::{<span class="ident">Cached</span>, <span class="ident">SimpleApp</span>, <span class="ident">ID</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">BuildingID</span>, <span class="ident">BuildingType</span>, <span class="ident">PathConstraints</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">lctrl</span>, <span class="ident">Btn</span>, <span class="ident">Checkbox</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>,
<span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>, <span class="ident">UpdateType</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
<span class="ident">lctrl</span>, <span class="ident">Btn</span>, <span class="ident">Checkbox</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">Fill</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>,
<span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">LinearGradient</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>, <span class="ident">UpdateType</span>,
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">animation</span>::<span class="ident">Animator</span>;
@ -532,11 +588,19 @@
)
.<span class="ident">build</span>(<span class="ident">ctx</span>, <span class="string">&quot;change map&quot;</span>, <span class="ident">lctrl</span>(<span class="ident">Key</span>::<span class="ident">L</span>))]),
<span class="string">&quot;Score&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;score&quot;</span>),
<span class="string">&quot;Energy&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;energy&quot;</span>),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;use upzone&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;use upzone&quot;</span>),
<span class="string">&quot;Next upzone&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;next upzone&quot;</span>),
<span class="string">&quot;Energy:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">draw_batch</span>(<span class="ident">ctx</span>, <span class="ident">GeomBatch</span>::<span class="ident">new</span>())
.<span class="ident">named</span>(<span class="string">&quot;energy&quot;</span>)
.<span class="ident">align_right</span>(),
]),
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Next upzone:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">Widget</span>::<span class="ident">draw_batch</span>(<span class="ident">ctx</span>, <span class="ident">GeomBatch</span>::<span class="ident">new</span>())
.<span class="ident">named</span>(<span class="string">&quot;next upzone&quot;</span>)
.<span class="ident">align_right</span>(),
]),
<span class="string">&quot;use upzone&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;use upzone&quot;</span>),
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Right</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>);
@ -561,16 +625,15 @@
<span class="string">&quot;score&quot;</span>,
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Score: {}&quot;</span>, <span class="ident">prettyprint_usize</span>(<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">score</span>)).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
);
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
<span class="kw">let</span> <span class="ident">energy_bar</span> <span class="op">=</span> <span class="ident">make_bar</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;energy&quot;</span>,
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() {
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Energy: {}&quot;</span>, <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span>).<span class="ident">draw_text</span>(<span class="ident">ctx</span>)
} <span class="kw">else</span> {
<span class="ident">Line</span>(<span class="string">&quot;Energy: you need to refuel!&quot;</span>).<span class="ident">fg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>).<span class="ident">draw</span>(<span class="ident">ctx</span>)
},
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span>.<span class="ident">max</span>(<span class="ident">Duration</span>::<span class="ident">ZERO</span>) <span class="op">/</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span>,
<span class="ident">ColorScale</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">Color</span>::<span class="ident">YELLOW</span>, <span class="ident">Color</span>::<span class="ident">GREEN</span>]),
);
<span class="kw">let</span> (<span class="ident">upzones_free</span>, <span class="ident">next_upzone</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">get_upzones</span>();
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy&quot;</span>, <span class="ident">energy_bar</span>);
<span class="kw">let</span> (<span class="ident">upzones_free</span>, <span class="ident">next_upzone_pct</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">get_upzones</span>();
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;use upzone&quot;</span>,
@ -585,19 +648,23 @@
)
},
);
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(
<span class="kw">let</span> <span class="ident">upzone_bar</span> <span class="op">=</span> <span class="ident">make_bar</span>(
<span class="ident">ctx</span>,
<span class="string">&quot;next upzone&quot;</span>,
<span class="macro">format</span><span class="macro">!</span>(<span class="string">&quot;Next upzone: {}&quot;</span>, <span class="ident">prettyprint_usize</span>(<span class="ident">next_upzone</span>)).<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">next_upzone_pct</span>,
<span class="comment">// TODO Probably similar color for showing depots</span>
<span class="ident">ColorScale</span>(<span class="macro">vec</span><span class="macro">!</span>[<span class="ident">Color</span>::<span class="ident">hex</span>(<span class="string">&quot;#EFEDF5&quot;</span>), <span class="ident">Color</span>::<span class="ident">hex</span>(<span class="string">&quot;#756BB1&quot;</span>)]),
);
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;next upzone&quot;</span>, <span class="ident">upzone_bar</span>);
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">upzone</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">SimpleApp</span>, <span class="ident">b</span>: <span class="ident">BuildingID</span>) {
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energy</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">config</span>.<span class="ident">max_energy</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">upzones_used</span> <span class="op">+</span><span class="op">=</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">houses</span>.<span class="ident">insert</span>(<span class="ident">b</span>, <span class="ident">BldgState</span>::<span class="ident">Depot</span>);
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">depot</span> <span class="op">=</span> <span class="ident">b</span>;
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">redraw</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">redraw_depots</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="self">self</span>.<span class="ident">sleigh</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">b</span>).<span class="ident">label_center</span>;
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">cam_zoom</span> <span class="op">=</span> <span class="ident">ZOOM</span>;
<span class="ident">ctx</span>.<span class="ident">canvas</span>.<span class="ident">center_on_map_pt</span>(<span class="self">self</span>.<span class="ident">sleigh</span>);
}
@ -893,13 +960,16 @@
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">&gt;</span> <span class="ident">Duration</span>::<span class="ident">ZERO</span>
}
<span class="doccomment">/// (upzones_free, next_upzone)</span>
<span class="kw">fn</span> <span class="ident">get_upzones</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">usize</span>, <span class="ident">usize</span>) {
<span class="doccomment">/// (upzones_free, next_upzone_pct)</span>
<span class="kw">fn</span> <span class="ident">get_upzones</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> (<span class="ident">usize</span>, <span class="ident">f64</span>) {
<span class="comment">// Start with a freebie</span>
<span class="kw">let</span> <span class="ident">total</span> <span class="op">=</span> <span class="number">1</span> <span class="op">+</span> <span class="self">self</span>.<span class="ident">score</span> <span class="op">/</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span>;
<span class="kw">let</span> <span class="ident">total</span> <span class="op">=</span> <span class="number">1</span> <span class="op">+</span> (<span class="self">self</span>.<span class="ident">score</span> <span class="op">/</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span>);
<span class="kw">let</span> <span class="ident">upzones_free</span> <span class="op">=</span> <span class="ident">total</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">upzones_used</span>;
<span class="kw">let</span> <span class="ident">next_upzone</span> <span class="op">=</span> (<span class="ident">total</span> <span class="op">+</span> <span class="number">1</span>) <span class="op">*</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span>;
(<span class="ident">upzones_free</span>, <span class="ident">next_upzone</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">score</span>)
<span class="kw">let</span> <span class="ident">next_upzone</span> <span class="op">=</span> <span class="ident">total</span> <span class="op">*</span> <span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span>;
(
<span class="ident">upzones_free</span>,
<span class="number">1.0</span> <span class="op">-</span> ((<span class="ident">next_upzone</span> <span class="op">-</span> <span class="self">self</span>.<span class="ident">score</span>) <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> (<span class="self">self</span>.<span class="ident">config</span>.<span class="ident">upzone_rate</span> <span class="kw">as</span> <span class="ident">f64</span>),
)
}
}
@ -938,5 +1008,45 @@
)])))
}
}
<span class="kw">fn</span> <span class="ident">make_bar</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">pct_full</span>: <span class="ident">f64</span>, <span class="ident">scale</span>: <span class="ident">ColorScale</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Widget</span> {
<span class="kw">let</span> <span class="ident">total_width</span> <span class="op">=</span> <span class="number">300.0</span>;
<span class="kw">let</span> <span class="ident">height</span> <span class="op">=</span> <span class="number">32.0</span>;
<span class="kw">let</span> <span class="ident">n</span> <span class="op">=</span> <span class="ident">scale</span>.<span class="number">0</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">width_each</span> <span class="op">=</span> <span class="ident">total_width</span> <span class="op">/</span> ((<span class="ident">n</span> <span class="op">-</span> <span class="number">1</span>) <span class="kw">as</span> <span class="ident">f64</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pieces</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">width_remaining</span> <span class="op">=</span> <span class="ident">pct_full</span> <span class="op">*</span> <span class="ident">total_width</span>;
<span class="kw">for</span> <span class="ident">i</span> <span class="kw">in</span> <span class="number">0</span>..<span class="ident">n</span> <span class="op">-</span> <span class="number">1</span> {
<span class="kw">let</span> <span class="ident">width</span> <span class="op">=</span> <span class="ident">width_each</span>.<span class="ident">min</span>(<span class="ident">width_remaining</span>);
<span class="ident">pieces</span>.<span class="ident">push</span>(<span class="ident">Polygon</span>::<span class="ident">rectangle</span>(<span class="ident">width</span>, <span class="ident">height</span>).<span class="ident">translate</span>((<span class="ident">i</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">*</span> <span class="ident">width_each</span>, <span class="number">0.0</span>));
<span class="kw">if</span> <span class="ident">width</span> <span class="op">&lt;</span> <span class="ident">width_each</span> {
<span class="kw">break</span>;
}
<span class="ident">width_remaining</span> <span class="op">-</span><span class="op">=</span> <span class="ident">width</span>;
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">Fill</span>::<span class="ident">LinearGradient</span>(<span class="ident">LinearGradient</span> {
<span class="ident">line</span>: <span class="ident">Line</span>::<span class="ident">must_new</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="number">0.0</span>, <span class="number">0.0</span>), <span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">total_width</span>, <span class="number">0.0</span>)),
<span class="ident">stops</span>: <span class="ident">scale</span>
.<span class="number">0</span>
.<span class="ident">iter</span>()
.<span class="ident">enumerate</span>()
.<span class="ident">map</span>(<span class="op">|</span>(<span class="ident">idx</span>, <span class="ident">color</span>)<span class="op">|</span> ((<span class="ident">idx</span> <span class="kw">as</span> <span class="ident">f64</span>) <span class="op">/</span> ((<span class="ident">n</span> <span class="op">-</span> <span class="number">1</span>) <span class="kw">as</span> <span class="ident">f64</span>), <span class="kw-2">*</span><span class="ident">color</span>))
.<span class="ident">collect</span>(),
}),
<span class="ident">Polygon</span>::<span class="ident">union_all</span>(<span class="ident">pieces</span>),
);
<span class="ident">batch</span>.<span class="ident">push</span>(
<span class="ident">Color</span>::<span class="ident">BLACK</span>,
<span class="ident">Polygon</span>::<span class="ident">rectangle</span>((<span class="number">1.0</span> <span class="op">-</span> <span class="ident">pct_full</span>) <span class="op">*</span> <span class="ident">total_width</span>, <span class="ident">height</span>)
.<span class="ident">translate</span>(<span class="ident">pct_full</span> <span class="op">*</span> <span class="ident">total_width</span>, <span class="number">0.0</span>),
);
<span class="ident">Widget</span>::<span class="ident">draw_batch</span>(<span class="ident">ctx</span>, <span class="ident">batch</span>)
.<span class="ident">padding</span>(<span class="number">2</span>)
.<span class="ident">outline</span>(<span class="number">2.0</span>, <span class="ident">Color</span>::<span class="ident">WHITE</span>)
}
</pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "experiment";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -114,7 +114,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 28 Nov 2020 18:36:15 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sun, 29 Nov 2020 00:23:58 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>