-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
175 lines (161 loc) · 7.36 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
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VZJ3R91X39"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){
console.log(arguments);
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-VZJ3R91X39');
</script>
<meta charset="UTF-8">
<meta http-equiv="Content-Language" content="en">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="website/favicon.png" type="image/png">
<title>CODEWORDS</title>
<meta name="application-name" content="Codewords">
<meta name="description" content="Find the 6 secret codewords in 6 tries. A new puzzle is available each day.">
<meta name="author" content="Thomas Dybdahl Ahle">
<meta property="og:image" content="https://codewords.app/static/codewords_og.png">
<meta property="og:description" content="Find the 6 secret codewords in 6 tries. A new puzzle is available each day.">
<meta property="og:url" content="https://codewords.app">
<meta property="og:title" content="Codewords - An AI word game">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css">
<link rel="stylesheet" href="website/styles.css">
<script src="https://unpkg.com/[email protected]/matrix.umd.js"></script>
<script src="website/game.js"></script>
</head>
<body onload="start()">
<header>
<div class="header-left"></div>
<h1>CODEWORDS</h1>
<menu>
<button id="help-button">
<i class="ti ti-help"></i>
</button>
<button id="stats-button">
<i class="ti ti-chart-bar"></i>
</button>
</menu>
</header>
<div class="container">
<div class="scoreboard">
<div class="spacer spacer-left"></div>
<div id="clue">Loading...</div>
<div class="info-text">
<p id="win-lose-text"></p>
<p class="see-stats">See the clues in <span class="link" id="stats-link">Statistics</span></p>
</div>
<div class="spacer spacer-right" id="round"></div>
</div>
<div id="gameBoard" class="board"></div>
<div id="bottom">
<span class="spacer1"></span>
<span class="spacer2"></span>
<div class="bottom-right">
<button id="endTurn" class="floating-circle">
Next Round
<i class="ti ti-player-track-next-filled"></i>
</button>
<span id="remainingClues"></span>
</div>
</div>
<footer>
<div>
<code>CODEWORDS</code> for <span class="date"></span>.
</div>
<div class="div-after-game">
Come back tomorrow for a new game, or play
<span class="link yesterdays-link">Yesterday's</span>.
</div>
<div class="div-during-game not-today">
Go to <span class="link todays-link">Today's</span>.
</div>
<div class="div-during-game is-today">
Go to <span class="link yesterdays-link">Yesterday's</span>.
</div>
<p class="credits">
Made by <a href="https://thomasahle.com" class="weak-link">Thomas Dybdahl Ahle</a>.
See <a href="https://github.com/thomasahle/codenames" class="weak-link">the source</a> and contribute on GitHub.
</p>
</footer>
</div>
<div id="help-modal" class="modal">
<div class="modal-content">
<h2>How to play</h2>
<button id="help-close" class="close">×</button>
<h3>Find the 6 secret words in 6 tries.</h3>
<ul>
<li>Each clue gives you a <b>word</b> and a <b>number</b>;
choose that many words related to the clue (e.g., HAT 2 means pick 2 words related to a hat).</li>
<li>Selecting a non-related word ends the round.</li>
</ul>
<p>Example: <b>HAT 2</b></p>
<ul class="card-list">
<li class="small-card good">HEAD<span>(Guessed & Intended)</span></li>
<li class="small-card">FACE<span>(Intended clue)</li>
<li class="small-card bad">JUPITER<span>(Incorrect)</span></li>
</ul>
<p class="gap-under">
Round ended early after guessing JUPITER.
</p>
<p>Example: <b>LODGE 3</b></p>
<ul class="card-list">
<li class="small-card good">POOL<span>(Guessed & Intended)</span></li>
<li class="small-card good">KING<span>(Guessed & Intended)</span></li>
<li class="small-card">EAGLE<span>(Intended clue)</span></li>
<li class="small-card good">GERMANY<span>(Guessed by chance)</span></li>
</ul>
<p class="gap-under">
Round ended after <b>3</b> guesses of the secret words.
</p>
<p class="gap-under">
The AI considers words similar if they are often used in the same context:
MODERATE can be a clue for DEGREE, or BOOM for <a title="Boom Shack-A-Lak" class="has-title" href="https://en.wikipedia.org/wiki/Boom_Shack-A-Lak">SHACK</a>.
It will also learn from user behavior.
</p>
<p>
A new puzzle is released daily at midnight, but you can play unlimited puzzles from earlier days.
</p>
</div>
</div>
<div id="stats-modal" class="modal">
<div class="modal-content">
<h2>Statistics</h2>
<button id="stats-close" class="close">×</button>
<div id="statsContainer" class="statsContainer">
<div class="statsItem">
<span class="big-number" id="playedCount">0</span>
<span class="number-label">Played</span>
</div>
<div class="statsItem">
<span class="big-number" id="winPercentage">0</span>
<span class="number-label">Win %</span>
</div>
<div class="statsItem">
<span class="big-number" id="currentStreak">0</span>
<span class="number-label">Current Streak</span>
</div>
<div class="statsItem">
<span class="big-number" id="maxStreak">0</span>
<span class="number-label">Max Streak</span>
</div>
</div>
<h3 class="gap-above">Rounds Used When Winning</h3>
<div id="guessDistribution"></div>
<h3 class="gap-above">Intended Clues From Game</h3>
<div id="post-game-analysis"></div>
<p class="small-gap-above">
Click the cards above to explain the associations.
</p>
<p class="gap-above" style="position: relative">
<span id="message" class="modal-message" style="display: none;">Copied results to clipboard!</span>
<button type="button" class="share-button" id="shareButton">Share <i class="ti ti-share"></i></button>
</p>
</div>
</div>
</body>
</html>