-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
53 lines (52 loc) · 2.7 KB
/
index.html
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>ScoreSettler</title>
<link rel="stylesheet" href="css/reset.css" type="text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="css/site.css" type="text/css" media="screen" charset="utf-8">
</head>
<body>
<div id="wrap">
<h1>ScoreSettler</h1>
<div id="description">
<p>This is a proof-of-concept of a simple utility, designed at keeping track of score averages in Settlers of Catan.</p>
<p>You see, as my friends and I play, it often seems that 6 or 8 winds up coming out on top, whereas statistically, 7 should be the most common. If I ever finish this thing, I'll be able to use it during a game to keep track of dice averages, which I find kind of exciting.</p>
<p>To use it (if it's not obvious): Click or tap the value that was rolled. It'll then show some stats and update the graph.</p>
<p>I've also built in some simulation:</p>
Roll interval (in milliseconds):<input id="simInterval" type="number" value="500" min="1" max="1000">
<button id="sim">Simulate Rolls</button>
<button id="reset">Reset Scoring</button>
</div> <!-- #description -->
<div id="settler">
<div id="buttons"></div> <!-- #buttons -->
<div id="stats">
<h3>Stats</h3>
<ul>
<li>Average: <span id="average"></span></li>
<li>Most common: <span id="common"></span></li>
<li>Last few rolls: <span id="rolls"></span></li>
</ul>
</div> <!-- #stats -->
<ul id="graph"></ul> <!-- #graph -->
</div> <!-- #settler -->
<!-- GitHub ribbon! -->
<a href="http://github.com/brianarn/ScoreSettler"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
<footer>
Copyright © 2011 Brian Arnold. MIT License. Built with JavaScript and love (and no JS libraries). <a href="http://github.com/brianarn/ScoreSettler">Source code</a> on <a href="http://github.com">GitHub</a>.
</footer>
</div> <!-- #wrap -->
<!-- Google Analytics, whee -->
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22284137-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script src="js/settler.js"></script>
</body>
</html>