-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
60 lines (58 loc) · 2.81 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
54
55
56
57
58
59
60
<html>
<head>
<title>Zpordle</title>
<meta name="description" content="A number guessing game with a p-adic twist.">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" type="image/png" href="favicon.png">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-G2HVJEMPWM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-G2HVJEMPWM');
</script>
</head>
<body>
<div style="text-align: center;">
<img id="logo" src="logo.png" alt ="Z_p-ordle">
<p id="result" class="modal" style="text-align: center"></p>
<p id="info"></p>
<p id="curguess"></p>
<div style="max-width: 300px; margin: auto;">
<div style="margin-left: 10px;">
<input type="text" id="guess-input"></input><button id="button" type="button" onclick="guess()">Guess</button><button id="statsButton" type="button" onclick="stats()">Statistics</button>
</div>
<ol id="guesses">
</div>
</ol>
<div style="max-width: 50%; margin: auto;">
<h2>Rules</h2>
<p>
Each day, a random integer will be picked between 0 and <span id="max-guess">"1000</span>. You will then have <span id="num-guesses">10</span> guesses to guess the number. Each guess will be associated with a prime number, given in increasing order. For a guess associated with prime p, the game will tell you the p-adic distance between your guess and the target number. Good luck!
</p>
<h3>
<a href="https://en.wikipedia.org/wiki/P-adic_order#p-adic_absolute_value">
p-adic Distance
</a>
</h3>
<p>
For a fixed prime p, define the p-adic norm of an integer x as p^-k, where x = np^k, with n not divisible by p. For example, for p = 3, the p-adic norm of 6 is 1/3, the p-adic norm of 9 is 1/9, and the p-adic norm of 11 is 1. The p-adic distance between two integers is the p-adic norm of the difference.
</p>
<p>
Dark Mode: <input type="checkbox" id="darkmode-checkbox" onclick="updateDarkMode()"><br>
<a href="https://github.com/mabotkin/zpordle">Github</a>
</p>
</div>
<!-- Remember to include jQuery :) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<!-- jQuery Modal -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
<script src="seedrandom.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="zpordle.js"></script>
</div>
</body>
</html>