1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
<!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="rem-bar">
<div id="oi">oi!</div>
<div id="p1-info">
<div id="p1-name"></div>
<div id="p1-rem"></div>
<div id="p1-sugg"></div>
<div id="p1-avg"></div>
</div>
<div id="p2-info">
<div id="p2-name"></div>
<div id="p2-rem"></div>
<div id="p2-sugg"></div>
<div id="p2-avg"></div>
</div>
</div>
<div id="keypad">
<div id="prompt-container">
<div id="prompt-msg-l"></div>
<div id="prompt-input"></div>
<div id="prompt-msg-r"></div>
</div>
<div onclick="promptHandle('append', 1)" class="key num">1</div>
<div onclick="promptHandle('append', 2)" class="key num">2</div>
<div onclick="promptHandle('append', 3)" class="key num">3</div>
<div onclick="promptHandle('append', 4)" class="key num">4</div>
<div onclick="promptHandle('append', 5)" class="key num">5</div>
<div onclick="promptHandle('append', 6)" class="key num">6</div>
<div onclick="promptHandle('append', 7)" class="key num">7</div>
<div onclick="promptHandle('append', 8)" class="key num">8</div>
<div onclick="promptHandle('append', 9)" class="key num">9</div>
<div onclick="promptHandle('clear')" class="key">CLEAR</div>
<div onclick="promptHandle('append', 0)" class="key num">0</div>
<div onclick="promptHandle('submit')" class="key ok">OK</div>
<div onclick="promptHandle('undo')" class="key" id="key_undo">UNDO</div>
<div onclick="promptHandle('submit_rem')" class="key">REMAINING</div>
</div>
<div id="settings-bar">
<div>dartboat™</div>
<div class="input first"><span>delay</span><input id="delay" onchange="setDelay(this.value)" maxlength="4" value="1000"></div>
<div class="input"><span>stdev</span><input id="stdev" onchange="setStdev(this.value)" maxlength="4" value=""></div>
<div class="help-button" onclick="modal('help-modal')">?</div>
</div>
<div id="visits"></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>
|