summaryrefslogtreecommitdiff
path: root/web/static/index.html
blob: 861adc5c9c00a274e1634b8582054e6f1983032f (plain) (blame)
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
<!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>