-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
274 lines (247 loc) Β· 13.2 KB
/
index.html
File metadata and controls
274 lines (247 loc) Β· 13.2 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
<!DOCTYPE html>
<html lang="he">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<!-- SEO Meta Tags -->
<title>Quoridor 3D - Strategic Board Game Online</title>
<meta name="description" content="Play Quoridor 3D online - a strategic board game where you race to reach the opposite side while blocking your opponent with walls. Features stunning 3D graphics, AI opponents, and multiplayer mode.">
<meta name="keywords" content="Quoridor, 3D board game, strategy game, online game, multiplayer, AI opponent, puzzle game, maze game, pathfinding">
<meta name="author" content="Shahar Maoz">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://shaharfullstack.github.io/Quoridor/">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://shaharfullstack.github.io/Quoridor/">
<meta property="og:title" content="Quoridor 3D - Strategic Board Game Online">
<meta property="og:description" content="Play Quoridor 3D online - a strategic board game where you race to reach the opposite side while blocking your opponent with walls.">
<meta property="og:image" content="https://shaharfullstack.github.io/Quoridor/assets/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:site_name" content="Quoridor 3D">
<meta property="og:locale" content="en_US">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://shaharfullstack.github.io/Quoridor/">
<meta property="twitter:title" content="Quoridor 3D - Strategic Board Game Online">
<meta property="twitter:description" content="Play Quoridor 3D online - a strategic board game where you race to reach the opposite side while blocking your opponent with walls.">
<meta property="twitter:image" content="https://shaharfullstack.github.io/Quoridor/assets/og-image.png">
<meta property="twitter:creator" content="@shaharmaoz">
<!-- Web App Manifest -->
<meta name="theme-color" content="#1f2937">
<meta name="msapplication-TileColor" content="#1f2937">
<meta name="msapplication-config" content="browserconfig.xml">
<link rel="manifest" href="manifest.json">
<!-- Favicons - Optimized order for maximum visibility -->
<link rel="icon" type="image/svg+xml" href="assets/icons/favicon.svg">
<link rel="icon" type="image/png" sizes="48x48" href="assets/icons/favicon-48x48.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/icons/favicon-16x16.png">
<link rel="shortcut icon" href="assets/icons/favicon.ico">
<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="assets/icons/apple-touch-icon.png">
<!-- iOS Web App -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Quoridor 3D">
<!-- Performance and Security -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="format-detection" content="telephone=no">
<meta name="mobile-web-app-capable" content="yes">
<!-- Game-specific Meta -->
<meta name="game-type" content="strategy">
<meta name="players" content="1-2">
<meta name="rating" content="general">
<meta name="application-name" content="Quoridor 3D">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap">
<link rel="stylesheet" href="styles.css">
</head>
<body class="rtl">
<div id="game-container">
<canvas id="c"></canvas>
<!-- Starting Screen Overlay -->
<div id="start-screen" class="start-screen">
<button id="start-language-toggle" class="start-lang-toggle" onclick="switchLanguage()">
<span>π</span> <span class="btn-text">English</span>
</button>
<!-- Character 3D Models as Background Elements -->
<div class="character-left">
<canvas id="character-left-canvas"></canvas>
</div>
<div class="character-right">
<canvas id="character-right-canvas"></canvas>
</div>
<div class="start-content">
<div class="game-logo">
<h1>Quoridor 3D</h1>
<p id="game-description">Reach the other side before your opponent!</p>
</div>
<div class="start-game-modes">
<button class="start-btn" onclick="selectGameMode('pvc')">
<div class="btn-icon">π€</div>
<div class="btn-content">
<div class="btn-title" id="pvc-btn-text">Player vs AI</div>
<div class="btn-subtitle" id="pvc-subtitle">Challenge the computer</div>
</div>
</button>
<button class="start-btn" onclick="selectGameMode('pvp')">
<div class="btn-icon">π₯</div>
<div class="btn-content">
<div class="btn-title" id="pvp-btn-text">Player vs Player</div>
<div class="btn-subtitle" id="pvp-subtitle">Play against a friend</div>
</div>
</button>
</div>
<div id="difficulty-selection" class="difficulty-selection" style="display: none;">
<h3 id="difficulty-title">Choose AI Difficulty</h3>
<div class="difficulty-options">
<button class="difficulty-btn" onclick="selectDifficulty('easy')">
<span>π</span>
<div>
<div class="diff-title" id="easy-btn-text">Easy</div>
<div class="diff-desc" id="easy-desc">Relaxed gameplay</div>
</div>
</button>
<button class="difficulty-btn" onclick="selectDifficulty('medium')">
<span>π₯΅</span>
<div>
<div class="diff-title" id="medium-btn-text">Medium</div>
<div class="diff-desc" id="medium-desc">Balanced challenge</div>
</div>
</button>
<button class="difficulty-btn" onclick="selectDifficulty('hard')">
<span>π€¬</span>
<div>
<div class="diff-title" id="hard-btn-text">Hard</div>
<div class="diff-desc" id="hard-desc">Expert level</div>
</div>
</button>
</div>
</div>
</div>
</div>
<!-- Main Action Buttons -->
<div id="main-controls" class="main-controls">
<button id="move-btn" class="action-btn active">
<span>πΆ</span>
<span class="btn-label" id="move-btn-label">Move</span>
</button>
<button id="wall-btn" class="action-btn">
<span>π§±</span>
<span class="btn-label" id="wall-btn-label">ΧΧΧΧ</span>
</button>
<button id="main-language-toggle" class="action-btn" onclick="switchLanguage()">
<span>π</span>
<span class="btn-label">English</span>
</button>
</div>
<!-- Foldable Menu -->
<div id="game-menu" class="game-menu collapsed">
<button id="menu-toggle" class="menu-toggle" onclick="toggleMenu()">
<span class="menu-icon">β°</span>
</button>
<div class="menu-content">
<!-- Game Status -->
<div id="main-ui" class="menu-section">
<div class="game-status">
<h3>Game Status</h3>
<div class="players-info">
<div id="p1-status" class="player-info">Player 1: 10 walls</div>
<div id="p2-status" class="player-info">Player 2: 10 walls</div>
</div>
<div id="turn-indicator" class="turn-info">
<span class="loading-spinner"></span> Loading models...
</div>
<div id="action-prompt" class="action-info"></div>
</div>
</div>
<!-- Game Controls -->
<div class="menu-section">
<h3>Game Controls</h3>
<div class="game-controls">
<button id="reset-btn" class="menu-btn">
<span>π </span> <span class="btn-text">New Game</span>
</button>
<button id="restart-btn" class="menu-btn">
<span>π</span> <span class="btn-text">Restart</span>
</button>
<button id="undo-btn" class="menu-btn">
<span>βΆ</span> <span class="btn-text">Undo Move</span>
</button>
</div>
</div>
<!-- Settings -->
<div class="menu-section">
<h3>Settings</h3>
<div class="settings-controls">
<button id="language-toggle" class="menu-btn">
<span>π</span> <span class="btn-text">Language</span>
</button>
<button id="sound-toggle" class="menu-btn">
<span>π</span> <span class="btn-text">Sound</span>
</button>
<button id="theme-toggle" class="menu-btn">
<span>π</span> <span class="btn-text">Dark Mode</span>
</button>
<button id="fullscreen-btn" class="menu-btn">
<span>βΆ</span> <span class="btn-text">Fullscreen</span>
</button>
</div>
</div>
<!-- Game Info -->
<div class="menu-section">
<h3>How to Play</h3>
<div class="game-info">
<p> <strong>Goal:</strong> Reach the opposite side of the board</p>
<p> <strong>Move:</strong> Click on highlighted squares to move your piece</p>
<p> <strong>Walls:</strong> Place walls to block your opponent's path</p>
<p> <strong>Tip:</strong> You can jump over your opponent!</p>
</div>
</div>
</div>
</div>
<div id="winner-message" class="winner-overlay">
<div class="winner-content">
<div class="winner-text"></div>
<div class="winner-actions">
<button id="winner-menu-btn" class="winner-btn">π Main Menu</button>
<button id="winner-replay-btn" class="winner-btn">π Play Again</button>
</div>
</div>
</div>
</div>
<!-- Mobile Help Text -->
<div id="mobile-help" class="mobile-help">
Tap to move β’ Double-tap to switch modes
</div>
</div>
<!-- Import Map for Three.js modules -->
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.165.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.165.0/examples/jsm/"
}
}
</script>
<!-- Game Logic Scripts -->
<script src="js/globals.js"></script>
<script>window.logTimer('DOM content loading started', 'DOM');</script>
<script src="js/language.js"></script>
<script src="js/ai.js"></script>
<script src="js/mobile.js"></script>
<script src="js/ui.js"></script>
<!-- Main game script, loaded as a module to handle imports -->
<script type="module" src="js/game.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
window.logTimer('DOM content loaded', 'DOM');
});
window.addEventListener('load', () => {
window.logTimer('Window load complete', 'DOM');
});
</script>
</body>
</html>