This commit is contained in:
dabreegster 2020-12-17 01:11:57 +00:00
parent 3da776a42b
commit 0969ced539
7 changed files with 19 additions and 19 deletions

File diff suppressed because one or more lines are too long

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 `GameState` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, GameState"><title>experiment::game::GameState - 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"> <!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 `GameState` struct in crate `experiment`."><meta name="keywords" content="rust, rustlang, rust-lang, GameState"><title>experiment::game::GameState - 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-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 GameState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.bldgs">bldgs</a><a href="#structfield.boost">boost</a><a href="#structfield.draw_done_houses">draw_done_houses</a><a href="#structfield.energy">energy</a><a href="#structfield.energyless_arrow">energyless_arrow</a><a href="#structfield.game_over">game_over</a><a href="#structfield.idle_time">idle_time</a><a href="#structfield.level">level</a><a href="#structfield.score">score</a><a href="#structfield.vehicle">vehicle</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.has_energy">has_energy</a><a href="#method.met_goal">met_goal</a><a href="#method.new">new</a><a href="#method.present_dropped">present_dropped</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: 'GameState', 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> <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 GameState</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.bldgs">bldgs</a><a href="#structfield.boost">boost</a><a href="#structfield.draw_done_houses">draw_done_houses</a><a href="#structfield.energy">energy</a><a href="#structfield.energyless_arrow">energyless_arrow</a><a href="#structfield.game_over">game_over</a><a href="#structfield.idle_time">idle_time</a><a href="#structfield.level">level</a><a href="#structfield.score">score</a><a href="#structfield.vehicle">vehicle</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.has_energy">has_energy</a><a href="#method.met_goal">met_goal</a><a href="#method.new">new</a><a href="#method.present_dropped">present_dropped</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: 'GameState', 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#477-495' 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=''>GameState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct GameState { <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#478-495' 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=''>GameState</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust struct'>struct GameState {
level: <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>, level: <a class="struct" href="../../experiment/levels/struct.Level.html" title="struct experiment::levels::Level">Level</a>,
vehicle: <a class="struct" href="../../experiment/vehicles/struct.Vehicle.html" title="struct experiment::vehicles::Vehicle">Vehicle</a>, vehicle: <a class="struct" href="../../experiment/vehicles/struct.Vehicle.html" title="struct experiment::vehicles::Vehicle">Vehicle</a>,
bldgs: <a class="struct" href="../../experiment/buildings/struct.Buildings.html" title="struct experiment::buildings::Buildings">Buildings</a>, bldgs: <a class="struct" href="../../experiment/buildings/struct.Buildings.html" title="struct experiment::buildings::Buildings">Buildings</a>,

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"> <!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-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> <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-c1f324f9d3d7e3b2/out/built.rs.html#53' 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;Thu, 17 Dec 2020 00:33:13 +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-c1f324f9d3d7e3b2/out/built.rs.html#53' 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;Thu, 17 Dec 2020 01:09:43 +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> </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>

View File

@ -369,7 +369,7 @@
<span class="ident">Line</span>(<span class="string">&quot;apartments&quot;</span>).<span class="ident">fg</span>(<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">apartment</span>), <span class="ident">Line</span>(<span class="string">&quot;apartments&quot;</span>).<span class="ident">fg</span>(<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">apartment</span>),
]); ]);
<span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[ <span class="ident">txt</span>.<span class="ident">add_appended</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Refill presents from &quot;</span>), <span class="ident">Line</span>(<span class="string">&quot;Raise your blood sugar by visiting &quot;</span>),
<span class="ident">Line</span>(<span class="string">&quot;stores&quot;</span>).<span class="ident">fg</span>(<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">store</span>), <span class="ident">Line</span>(<span class="string">&quot;stores&quot;</span>).<span class="ident">fg</span>(<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">store</span>),
]); ]);
@ -554,7 +554,7 @@
.<span class="ident">align_right</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="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Carrying capacity:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>), <span class="string">&quot;Cookie jar capacity:&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="ident">custom_bar</span>( <span class="ident">custom_bar</span>(
<span class="ident">ctx</span>, <span class="ident">ctx</span>,
<span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">energy</span>, <span class="ident">app</span>.<span class="ident">session</span>.<span class="ident">colors</span>.<span class="ident">energy</span>,
@ -579,7 +579,7 @@
<span class="string">&quot;Multi-use buildings have stores on the ground floor, with apartments on top&quot;</span>, <span class="string">&quot;Multi-use buildings have stores on the ground floor, with apartments on top&quot;</span>,
)); ));
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>( <span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(
<span class="string">&quot;Try finding the best spot for new stores, to help you refill faster&quot;</span>, <span class="string">&quot;Try finding the best spot for new stores, to help you refill cookies faster&quot;</span>,
)); ));
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">&quot;&quot;</span>)); <span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">&quot;&quot;</span>));
<span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">&quot;Use your mouse to select your changes.&quot;</span>)); <span class="ident">txt</span>.<span class="ident">add</span>(<span class="ident">Line</span>(<span class="string">&quot;Use your mouse to select your changes.&quot;</span>));

View File

@ -686,7 +686,7 @@
<span class="kw">let</span> <span class="ident">status_panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[ <span class="kw">let</span> <span class="ident">status_panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="string">&quot;Complete Deliveries&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;score label&quot;</span>), <span class="string">&quot;Complete Deliveries&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;score label&quot;</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;score&quot;</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;score&quot;</span>),
<span class="string">&quot;Remaining Presents&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;energy label&quot;</span>), <span class="string">&quot;Blood sugar&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>).<span class="ident">named</span>(<span class="string">&quot;energy label&quot;</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">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">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">RightInset</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">TopInset</span>) .<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">RightInset</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">TopInset</span>)
@ -921,7 +921,7 @@
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">has_energy</span>() {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energyless_arrow</span>.<span class="ident">is_some</span>() { <span class="kw">if</span> <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energyless_arrow</span>.<span class="ident">is_some</span>() {
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energyless_arrow</span> <span class="op">=</span> <span class="prelude-val">None</span>; <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">energyless_arrow</span> <span class="op">=</span> <span class="prelude-val">None</span>;
<span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="string">&quot;Remaining Presents&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>); <span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="string">&quot;Blood sugar&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>);
<span class="self">self</span>.<span class="ident">status_panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy label&quot;</span>, <span class="ident">label</span>); <span class="self">self</span>.<span class="ident">status_panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy label&quot;</span>, <span class="ident">label</span>);
} }
} <span class="kw">else</span> { } <span class="kw">else</span> {
@ -931,9 +931,10 @@
<span class="ident">app</span>.<span class="ident">time</span>, <span class="ident">app</span>.<span class="ident">time</span>,
<span class="self">self</span>.<span class="ident">state</span>.<span class="ident">bldgs</span>.<span class="ident">all_stores</span>(), <span class="self">self</span>.<span class="ident">state</span>.<span class="ident">bldgs</span>.<span class="ident">all_stores</span>(),
)); ));
<span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="kw">let</span> <span class="ident">label</span> <span class="op">=</span> <span class="ident">Text</span>::<span class="ident">from</span>(
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(<span class="string">&quot;Out of presents - refill from a store!&quot;</span>).<span class="ident">fg</span>(<span class="ident">Color</span>::<span class="ident">RED</span>)) <span class="ident">Line</span>(<span class="string">&quot;SANTA&#39;S HANGRY - grab some cookies from a store!&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="ident">draw</span>(<span class="ident">ctx</span>);
<span class="self">self</span>.<span class="ident">status_panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy label&quot;</span>, <span class="ident">label</span>); <span class="self">self</span>.<span class="ident">status_panel</span>.<span class="ident">replace</span>(<span class="ident">ctx</span>, <span class="string">&quot;energy label&quot;</span>, <span class="ident">label</span>);
} }
<span class="self">self</span>.<span class="ident">state</span> <span class="self">self</span>.<span class="ident">state</span>
@ -1104,7 +1105,6 @@
<span class="comment">// Number of deliveries</span> <span class="comment">// Number of deliveries</span>
<span class="ident">score</span>: <span class="ident">usize</span>, <span class="ident">score</span>: <span class="ident">usize</span>,
<span class="comment">// Number of presents currently being carried</span>
<span class="ident">energy</span>: <span class="ident">usize</span>, <span class="ident">energy</span>: <span class="ident">usize</span>,
<span class="ident">boost</span>: <span class="ident">Duration</span>, <span class="ident">boost</span>: <span class="ident">Duration</span>,
@ -1148,7 +1148,7 @@
<span class="kw">let</span> <span class="ident">deliveries</span> <span class="op">=</span> <span class="ident">num_housing_units</span>.<span class="ident">min</span>(<span class="self">self</span>.<span class="ident">energy</span>); <span class="kw">let</span> <span class="ident">deliveries</span> <span class="op">=</span> <span class="ident">num_housing_units</span>.<span class="ident">min</span>(<span class="self">self</span>.<span class="ident">energy</span>);
<span class="self">self</span>.<span class="ident">score</span> <span class="op">+</span><span class="op">=</span> <span class="ident">deliveries</span>; <span class="self">self</span>.<span class="ident">score</span> <span class="op">+</span><span class="op">=</span> <span class="ident">deliveries</span>;
<span class="self">self</span>.<span class="ident">bldgs</span>.<span class="ident">buildings</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">BldgState</span>::<span class="ident">Done</span>); <span class="self">self</span>.<span class="ident">bldgs</span>.<span class="ident">buildings</span>.<span class="ident">insert</span>(<span class="ident">id</span>, <span class="ident">BldgState</span>::<span class="ident">Done</span>);
<span class="self">self</span>.<span class="ident">energy</span> <span class="op">-</span><span class="op">=</span> <span class="ident">deliveries</span>; <span class="self">self</span>.<span class="ident">energy</span> <span class="op">-</span><span class="op">=</span> <span class="number">1</span>;
<span class="self">self</span>.<span class="ident">draw_done_houses</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">bldgs</span>.<span class="ident">draw_done_houses</span>(<span class="ident">ctx</span>, <span class="ident">app</span>); <span class="self">self</span>.<span class="ident">draw_done_houses</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">bldgs</span>.<span class="ident">draw_done_houses</span>(<span class="ident">ctx</span>, <span class="ident">app</span>);
<span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">deliveries</span>); <span class="kw">return</span> <span class="prelude-val">Some</span>(<span class="ident">deliveries</span>);
} }

View File

@ -259,10 +259,10 @@
.<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">fade_map_dark</span>) .<span class="ident">bg</span>(<span class="ident">app</span>.<span class="ident">cs</span>.<span class="ident">fade_map_dark</span>)
.<span class="ident">centered_horiz</span>(), .<span class="ident">centered_horiz</span>(),
<span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>( <span class="ident">Text</span>::<span class="ident">from</span>(<span class="ident">Line</span>(
<span class="string">&quot;Time for Santa to deliver presents in Seattle! But... 2020 has thoroughly \ <span class="string">&quot;Time for Santa to deliver presents in Seattle! But... COVID means no \
squashed any remaining magic out of the world, so your sleigh can only hold \ stopping in houses to munch on cookies (gluten-free and paleo, obviously). \
so many presents at a time. When you run out, refill from a store. Those are \ When your blood sugar gets low, you&#39;ll have to stop and refill your supply \
close to where people live... right?&quot;</span>, from a store. Those are close to where people live... right?&quot;</span>,
)) ))
.<span class="ident">wrap_to_pct</span>(<span class="ident">ctx</span>, <span class="number">50</span>) .<span class="ident">wrap_to_pct</span>(<span class="ident">ctx</span>, <span class="number">50</span>)
.<span class="ident">draw</span>(<span class="ident">ctx</span>) .<span class="ident">draw</span>(<span class="ident">ctx</span>)

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span> <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="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="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;Thu, 17 Dec 2020 00:33:13 +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;Thu, 17 Dec 2020 01:09:43 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</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="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> <span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>