-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
282 lines (260 loc) · 11.5 KB
/
index.html
File metadata and controls
282 lines (260 loc) · 11.5 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-RH0S49Z6L6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-RH0S49Z6L6');
</script>
<meta charset="UTF-8"/>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>Pokémon Chess</title>
<link rel="shortcut icon" href="favicon.ico">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="js/socket.io.min.js?v=2"></script>
<script src="js/md5.min.js"></script>
<link href="css/chess.css?v=231026" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" rel="stylesheet"/>
<link href="//cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet"/>
<script src="//cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
</head>
<body onload="loadImages()">
<div class="content">
<div class="hidden update_div" data-date="20231026">
26th October Update!
<ul style="list-style-position:inside;">
<li>Team Builder! Configure and save your teams before joining a game.</li>
<li>Room options! Disable RNG, enforce random teams and choose from 3 different timer options.</li>
<li>Forfeit button! Lost your queen and salty? At least forfeit instead of rage quitting.</li>
<li>Timer fixes, now kept track of on the server instead of on each client.</li>
<li>It should no longer be possible to create multiple rooms at once.</li>
<li>Cheater detection. If you win for seemingly no reason, they may have been trying to cheat...</li>
<li>Move related gifs and audio now preloaded so shouldn't be late the first time.</li>
<li>Algebraic notation around the board.</li>
<li>To discuss (and report new bugs...), join the <a href="https://discord.gg/fp5bcCqg8q" target="_blank">discord</a>!</li>
</ul>
<a href="#" class="dismiss_update" data-date="20231026">Click here to dismiss.</a>
</div>
<div style="width:100%">
<img src="img/Pokemon%20Chess%20Logo.webp" height="300px" style="margin:10px;"/>
</div>
<div id="setup_div" class="">
<span id="preloading_images">Preloading images! <b id="loaded_count">0/197</b></span>
<div id="images_loaded" class="hidden">
<input maxlength="30" type="text" id="yourName" placeholder="Your Name (Enter to see rooms)"/>
<div id="has_name" class="hidden">
<button id="start_host" class="button-1">Host Game</button>
<br/>
<button id="team_builder" class="button-1">Team Builder</button>
<table style="margin:0 auto;" id="room_settings" class="hidden">
<tbody>
<tr>
<td>Room Name</td>
<td><input maxlength="30" type="text" id="roomName" placeholder="Room Name"/></td>
</tr>
<tr>
<td>Room Password</td>
<td><input type="text" id="roomPassword" placeholder="Password (Optional)"/></td>
</tr>
<tr>
<td>Disable Critical Hits & Misses</td>
<td><i id="no_rng" class="no_rng toggle pointer fa-solid fa-toggle-off fa-2x"></i></td>
</tr>
<tr>
<td>Random Teams</td>
<td><i id="random_teams" class="toggle pointer fa-solid fa-toggle-off fa-2x"></i></td>
</tr>
<tr>
<td>Timer</td>
<td><select id="timer_setting">
<option value="10">10 Mins</option>
<option value="3|2">Blitz 3|2</option>
<option value="F">None</option>
</select></td>
</tr>
</tbody>
</table>
<button id="host_game" class="button-1 hidden">Host Game</button>
<br/>
<h3>Available Rooms <span id="available_count">()</span> <i
class="fa fa-rotate reload-rooms pointer"></i></h3>
<table id="available_table" class="styled-table" style="width:850px;">
<thead>
<tr>
<th>Host</th>
<th>Room Name</th>
<th>Win Rate</th>
<th><i class="fa fa-key"></i></th>
<th>No RNG</th>
<th>Random Teams</th>
<th>Timer</th>
</tr>
</thead>
<tbody id="room_list">
</tbody>
</table>
<br/>
<h3>Spectate <span id="spectate_count">()</span> <i class="fa fa-rotate reload-spectate pointer"></i>
</h3>
<table id="spectate_table" class="styled-table" style="width:850px;">
<thead>
<tr>
<th>Player 1</th>
<th>Player 2</th>
<th>Room Name</th>
<th>Type</th>
</tr>
</thead>
<tbody id="spectate_list">
</tbody>
</table>
</div>
</div>
</div>
<div id="game" class="hidden">
<h1 class="enemy_element" id="enemy_name">Awaiting Opponent...</h1>
<button id="enemy_ready" class="button-1 unready enemy_element" style="pointer-events:none;">Not Ready <i
class="fa fa-thumbs-down"></i></button>
<button class="back_menu team_builder button-1 hidden">Back to Menu</button>
<div style="width:100%;height:100%;position:relative;">
<div id="mid_board" class="hidden"></div>
<div id="promotion_choice" class="hidden board_message">
Choose Promotion<br/>
<img class="pointer" data-type="QUEEN" src="img/queen%20white.png" width="100px"/>
<img class="pointer" data-type="KNIGHT" src="img/knight%20white.png" width="100px"/>
<img class="pointer" data-type="BISHOP" src="img/bishop%20white.png" width="100px"/>
<img class="pointer" data-type="ROOK" src="img/rook%20white.png" width="100px"/>
</div>
<div id="win_message" class="hidden board_message">
<h3>Game Over!</h3>
<div id="winner_name"></div>
<br/>
<div id="rematch_wanted"></div>
<button class="button-1" id="rematch">Rematch?</button>
<br/>
<button class="button-1 back_menu">Back to Menu</button>
</div>
<div id="opponent_disconnected" class="hidden board_message">
<b>Opponent disconnected!</b><br/><br/>
<button class="back_menu button-1">Back to Menu</button>
</div>
<div id="you_disconnected" class="hidden board_message">
<b>You have disconnected for reason: <span id="disconnect_reason"></span></b><br/>
Attempting to reconnect...<br/><br/>
<button class="button-1" onclick="location.reload()">Reload</button>
</div>
<div id="skip_move_hint" class="hidden board_message">
<b>There's a skip additional move button below the board if you don't want to do an additional
move...</b>
</div>
<div id="spectators"></div>
<div id="enemy_gif" class="hidden"><img src=""/></div>
<div class="grid_border grid_numbers">
<div style="height:25px;"></div>
<div class="chess_number">8</div>
<div class="chess_number">7</div>
<div class="chess_number">6</div>
<div class="chess_number">5</div>
<div class="chess_number">4</div>
<div class="chess_number">3</div>
<div class="chess_number">2</div>
<div class="chess_number">1</div>
<div style="height:25px;"></div>
</div>
<div class="grid_border grid_letters" style="top:0">
<div style="width:25px;"></div>
<div class="chess_letter">A</div>
<div class="chess_letter">B</div>
<div class="chess_letter">C</div>
<div class="chess_letter">D</div>
<div class="chess_letter">E</div>
<div class="chess_letter">F</div>
<div class="chess_letter">G</div>
<div class="chess_letter">H</div>
<div style="width:25px;"></div>
</div>
<canvas id="chess_game" width="800" height="800">
Canvas enabled chess game.
</canvas>
<div class="grid_border grid_numbers" style="right:0;top:0;">
<div style="height:25px;"></div>
<div class="chess_number">8</div>
<div class="chess_number">7</div>
<div class="chess_number">6</div>
<div class="chess_number">5</div>
<div class="chess_number">4</div>
<div class="chess_number">3</div>
<div class="chess_number">2</div>
<div class="chess_number">1</div>
<div style="height:25px;"></div>
</div>
<div class="grid_border grid_letters" style="bottom:0;">
<div style="width:25px;"></div>
<div class="chess_letter">A</div>
<div class="chess_letter">B</div>
<div class="chess_letter">C</div>
<div class="chess_letter">D</div>
<div class="chess_letter">E</div>
<div class="chess_letter">F</div>
<div class="chess_letter">G</div>
<div class="chess_letter">H</div>
<div style="width:25px;"></div>
</div>
<div id="player_gif" class="hidden"><img src=""/></div>
<div class="taken_area" id="enemy_taken"></div>
<div id="chess_clock" class="hidden">
<div class="player_clock" data-remaining="600000" id="enemy_clock">10:00.0</div>
<div class="divider"><i class="fa fa-3x fa-clock"></i></div>
<div class="player_clock" data-remaining="600000" id="player_clock">10:00.0</div>
</div>
<div class="taken_area" id="player_taken"></div>
</div>
<button id="switch_sides" class="button-1 hidden">Switch Sides</button>
<button id="player_ready" class="button-1 unready hidden">Ready <i class="fa fa-thumbs-up"></i></button>
<button id="skip_move" class="button-1 hidden">Skip Additional Move</button>
<h1 id="player_name"></h1>
<button id="forfeit_game" class="button-1 hidden">Forfeit</button>
<div class="hidden" id="types"></div>
<div id="piece_setup_div" class="hidden" style="padding-bottom:70px;">
<div id="piece_choice"></div>
<table class="styled-table" id="saved_teams_table" style="width:850px;">
<thead>
<tr>
<th>Team Name</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<button class="button-1 inline-button" id="randomise_all">Randomise All</button>
<button class="button-1 inline-button" id="randomise_missing">Randomise Missing</button>
<button class="button-1 inline-button hidden" id="save_team">Save Team</button>
<button class="button-1 inline-button" id="clear_team">Clear Team</button>
<!--<br/>
<button class="button-1 inline-button" id="copy_live">Copy Teams to LIVE PokemonChess.com</button>-->
<div id="taken_piece"></div>
</div>
</div>
</div>
<div id="left_information">
Join the <a href="https://discord.gg/fp5bcCqg8q" target="_blank"><i class="fa-brands fa-discord"></i>
Discord!</a><br/>
Check out <a href="https://smashmonopoly.com" target="_blank">Smash Monopoly!</a><br/>
If you enjoy consider <a href="https://paypal.me/elxando" target="_blank">buying the dev a coffee?</a>
</div>
<div id="information">
Idea and graphics by <a href="https://www.youtube.com/c/LittleZubat" target="_blank">Little Z</a><br/>
Programming by <a href="https://linktr.ee/elxando" target="_blank">El Xando</a>
</div>
<!--<iframe style="display:none;" src="https://pokemonchess.com" id="ifr"></iframe>-->
</body>
<script src="js/chess.js?v=231026c"></script>
</html>