summaryrefslogtreecommitdiff
path: root/web/static/index.html
blob: e1384bbe676d4369c998d236e63200b769680bdb (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!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="info">
				<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="controls">
				<div id="prompt">
					<div id="prompt-msg-l"></div>
					<div id="prompt-input"></div>
					<div id="prompt-msg-r"></div>
				</div>
				<div id="keypad-default" class="keypad" style="display: none">
					<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="keypad-match_mode" class="keypad">
					<div onclick="promptHandle('append', 1); promptHandle('submit')" class="key"><span class="keyboard-val">[1]</span> Play against bot</div>
					<div onclick="promptHandle('append', 2); promptHandle('submit')" class="key"><span class="keyboard-val">[2]</span> One-player scoreboard</div>
					<div onclick="promptHandle('append', 3); promptHandle('submit')" class="key"><span class="keyboard-val">[3]</span> Two-player scoreboard</div>
				</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=""></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> uses an internal representation of a specification dartboard. Darts are thrown following a normal distribution, with the resultant coordinates used to calculate the segments in which they land. The idea is that this provides a more realistic opponent than picking points at random.</p>
				<p>
				<h2>Settings</h2>
				<p><em>stdev</em> — 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><em>delay</em> — milliseconds it takes the bot to throw each dart.</p>
				<h2>Info</h2>
				<p>dartboat is <a href="https://retarded.software/dartbot.git/" target="_blank">free and open-source software</a>. It is written in C and compiled to WebAssembly for the web target. JavaScript is used to handle the interactive elements.</p>
			</div>
		</div>
	</body>
</html>