-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
167 lines (161 loc) · 8.54 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html>
<head>
<title>Chaindle</title>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Rubik&display=swap" rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T7X8FV1MQY"></script>
<script>
/*window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-T7X8FV1MQY');*/
</script> -->
</head>
<body>
<div id="game-title">Daily Chaindle</div>
<div class="popups">
<div class="popup hidden" id="statistics-popup">
<button class="close-button" onclick="closePopup('game-over-popup')">x</button>
<div class="popup-message">
<h1>Chain Broken</h1>
<h2 id="game-over-chain-label">You scored a chain of length {}</h2>
</div>
</div>
<div class="popup" id="tutorial-popup">
<button class="close-button" onclick="closePopup('tutorial-popup')">x</button>
<div class="popup-message">
<h1>Welcome to Chaindle!</h1>
<h2>Like an infinite hard mode wordle, but every time you solve:</h2>
<ul>
<li>A new solution is selected</li>
<li>You gain 3 more guesses</li>
<li>The previous solution is used as your starting word</li>
</ul>
</div>
</div>
<div class="message-popup hidden" id="message"></div>
</div>
<game-board>
<div class="board">
<game-row><div class="row">
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
</div></game-row>
<game-row><div class="row">
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
</div></game-row>
<game-row><div class="row">
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
</div></game-row>
<game-row><div class="row">
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
</div></game-row>
<game-row><div class="row">
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
</div></game-row>
<game-row><div class="row">
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
<game-tile><div class="tile"></div></game-tile>
</div></game-row>
</div>
</game-board>
<game-keyboard>
<div class="keyboard-spacer"></div>
<div class="row">
<button class="game-key" onclick="letterEntry('q')">q</button>
<button class="game-key" onclick="letterEntry('w')">w</button>
<button class="game-key" onclick="letterEntry('e')">e</button>
<button class="game-key" onclick="letterEntry('r')">r</button>
<button class="game-key" onclick="letterEntry('t')">t</button>
<button class="game-key" onclick="letterEntry('y')">y</button>
<button class="game-key" onclick="letterEntry('u')">u</button>
<button class="game-key" onclick="letterEntry('i')">i</button>
<button class="game-key" onclick="letterEntry('o')">o</button>
<button class="game-key" onclick="letterEntry('p')">p</button>
</div>
<div class="row">
<div class="keyboard-buffer"></div>
<button class="game-key" onclick="letterEntry('a')">a</button>
<button class="game-key" onclick="letterEntry('s')">s</button>
<button class="game-key" onclick="letterEntry('d')">d</button>
<button class="game-key" onclick="letterEntry('f')">f</button>
<button class="game-key" onclick="letterEntry('g')">g</button>
<button class="game-key" onclick="letterEntry('h')">h</button>
<button class="game-key" onclick="letterEntry('j')">j</button>
<button class="game-key" onclick="letterEntry('k')">k</button>
<button class="game-key" onclick="letterEntry('l')">l</button>
<div class="keyboard-buffer"></div>
</div>
<div class="row">
<button class="game-large-key" onclick="playerTrySubmit()">Enter</button>
<button class="game-key" onclick="letterEntry('z')">z</button>
<button class="game-key" onclick="letterEntry('x')">x</button>
<button class="game-key" onclick="letterEntry('c')">c</button>
<button class="game-key" onclick="letterEntry('v')">v</button>
<button class="game-key" onclick="letterEntry('b')">b</button>
<button class="game-key" onclick="letterEntry('n')">n</button>
<button class="game-key" onclick="letterEntry('m')">m</button>
<button class="game-large-key" onclick="backspace()">Back</button>
</div>
</game-keyboard>
<div class="daily-bar">
<div class="sidebar-title">Daily</div>
New chains every day at midnight!
<div class="stats-section">
<h1>Stats</h1>
<div class="stats-container">
<div id="daily-best-chain">Best Chain: {}</div>
<div id="daily-games-played">Games Played: {}</div>
</div>
</div>
<!--<div id="previous-chains">
Previous Chains:
<div id="daily-chain-chart"></div>
</div>-->
</div>
<div class="freeplay-bar">
<div class="sidebar-title">Freeplay</div>
<div class="sidebar-info">
<label for="freeplay-seed-input">Freeplay Seed:</label>
<input name="freeplay-seed-input" type="text" id="freeplay-seed-input">
<button onclick="playFree()">Play Free</button>
</div>
<div class="stats-section">
<h1>Stats</h1>
<div class="stats-container">
<div id="freeplay-best-chain">Best Chain: {}</div>
<div id="freeplay-games-played">Games Played: {}</div>
</div>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.5/seedrandom.min.js"></script>
<script src="game.js"></script>
</html>