diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-20 11:00:24 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-20 11:00:24 -0700 |
commit | 05dd0652a768ac05740d1465d30e1792b874414f (patch) | |
tree | 4a631c8abd87fd06e969188fbc91519a3a154630 /web/static/index.html | |
parent | 36b74c04154cdecba1f999f5b358874502755cd0 (diff) | |
download | dartboat-05dd0652a768ac05740d1465d30e1792b874414f.tar.gz dartboat-05dd0652a768ac05740d1465d30e1792b874414f.tar.xz |
add web interface using Wasm
Diffstat (limited to 'web/static/index.html')
-rw-r--r-- | web/static/index.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/web/static/index.html b/web/static/index.html new file mode 100644 index 0000000..861adc5 --- /dev/null +++ b/web/static/index.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>dartboat™</title> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <meta name="viewport" content="width=device-width, user-scalable=no" /> + <link rel="stylesheet" type="text/css" href="style.css" /> + <script src="dartboat.js"></script> + <script src="dartboat_wasm.js"></script> + </head> + <body> + <div id="main"> + <div id="keypad"> + <div id="user-rem"></div> + <div id="oi"></div> + <div id="boat-rem"></div> + <div id="prompt-container"> + <div id="prompt-msg"></div> + <div id="prompt"></div> + <div id="prompt-sugg"></div> + </div> + <div onclick="promptAppend(1)" class="key num">1</div> + <div onclick="promptAppend(2)" class="key num">2</div> + <div onclick="promptAppend(3)" class="key num">3</div> + <div onclick="promptAppend(4)" class="key num">4</div> + <div onclick="promptAppend(5)" class="key num">5</div> + <div onclick="promptAppend(6)" class="key num">6</div> + <div onclick="promptAppend(7)" class="key num">7</div> + <div onclick="promptAppend(8)" class="key num">8</div> + <div onclick="promptAppend(9)" class="key num">9</div> + <div onclick="promptClear()" class="key">CLEAR</div> + <div onclick="promptAppend(0)" class="key num">0</div> + <div onclick="promptSubmit()" class="key">OK</div> + </div> + <div id="settings-bar"> + <div>dartboat™</div> + <div class="input first"><span>delay</span><input id="delay" onchange="delayChanged(this.value)" maxlength="4" value="1000"></div> + <div class="input"><span>stdev</span><input id="stdev" onchange="stdevChanged(this.value)" maxlength="4" value=""></div> + <div class="help-button" onclick="modal('help-modal')">?</div> + </div> + <div id="match"></div> + </div> + <div id="help-modal" class="modal"> + <div class="modal-content"> + <p><strong>dartboat</strong> works using an internal representation of a specification dartboard. Upon selecting a target, the dart is thrown following a normal distribution with configurable inaccuracy. The resultant coordinates are then used to calculate the segment in which the dart landed. The idea is that this provides a more realistic opponent than picking points at random.</p> + <p>The <em>stdev</em> setting controls the standard deviation of the bot's throws in millimetres. A value of 24 translates to a three-dart average of roughly 35. A value of 13 would be a 65 average, and a value of 8 a 95 average.</p> + <p>The <em>delay</em> setting controls how many milliseconds it takes the bot to throw each dart.</p> + <p>dartboat is <a href="https://retarded.software/dartbot.git/" target="_blank">free and open-source software</a>. It is written primarily in C. The web target is compiled to WebAssembly, along with some JavaScript for the interactive elements. This is a work in progress—a lot of features are missing and a lot of things will change.</p> + </div> + </div> + </body> +</html> |