akhaliq HF Staff commited on
Commit
db9a8a8
·
verified ·
1 Parent(s): 6bb3c7a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +632 -19
index.html CHANGED
@@ -1,19 +1,632 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Guess the Location Game</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
14
+ }
15
+
16
+ :root {
17
+ --primary: #4361ee;
18
+ --secondary: #3a0ca3;
19
+ --accent: #f72585;
20
+ --light: #f8f9fa;
21
+ --dark: #212529;
22
+ --success: #4cc9f0;
23
+ --warning: #f8961e;
24
+ --danger: #e63946;
25
+ }
26
+
27
+ body {
28
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
29
+ min-height: 100vh;
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ padding: 20px;
34
+ color: var(--light);
35
+ }
36
+
37
+ .container {
38
+ max-width: 800px;
39
+ width: 100%;
40
+ background: rgba(255, 255, 255, 0.1);
41
+ backdrop-filter: blur(10px);
42
+ border-radius: 20px;
43
+ box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
44
+ overflow: hidden;
45
+ padding: 30px;
46
+ }
47
+
48
+ .header {
49
+ display: flex;
50
+ justify-content: space-between;
51
+ align-items: center;
52
+ padding-bottom: 20px;
53
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
54
+ margin-bottom: 30px;
55
+ }
56
+
57
+ .logo {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: 10px;
61
+ font-size: 24px;
62
+ font-weight: 700;
63
+ }
64
+
65
+ .logo i {
66
+ color: var(--accent);
67
+ }
68
+
69
+ .anycoder-link {
70
+ font-size: 14px;
71
+ color: var(--light);
72
+ text-decoration: none;
73
+ background: rgba(255, 255, 255, 0.1);
74
+ padding: 8px 15px;
75
+ border-radius: 20px;
76
+ transition: all 0.3s ease;
77
+ }
78
+
79
+ .anycoder-link:hover {
80
+ background: rgba(255, 255, 255, 0.2);
81
+ transform: translateY(-2px);
82
+ }
83
+
84
+ .game-container {
85
+ display: grid;
86
+ grid-template-columns: 1fr 1fr;
87
+ gap: 30px;
88
+ }
89
+
90
+ @media (max-width: 768px) {
91
+ .game-container {
92
+ grid-template-columns: 1fr;
93
+ }
94
+ }
95
+
96
+ .image-container {
97
+ position: relative;
98
+ border-radius: 15px;
99
+ overflow: hidden;
100
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
101
+ height: 300px;
102
+ background: var(--dark);
103
+ display: flex;
104
+ justify-content: center;
105
+ align-items: center;
106
+ }
107
+
108
+ .location-image {
109
+ width: 100%;
110
+ height: 100%;
111
+ object-fit: cover;
112
+ transition: all 0.5s ease;
113
+ }
114
+
115
+ .image-placeholder {
116
+ display: flex;
117
+ flex-direction: column;
118
+ align-items: center;
119
+ justify-content: center;
120
+ color: rgba(255, 255, 255, 0.7);
121
+ padding: 20px;
122
+ text-align: center;
123
+ }
124
+
125
+ .image-placeholder i {
126
+ font-size: 60px;
127
+ margin-bottom: 15px;
128
+ color: rgba(255, 255, 255, 0.5);
129
+ }
130
+
131
+ .game-info {
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: 20px;
135
+ }
136
+
137
+ .score-container {
138
+ background: rgba(255, 255, 255, 0.1);
139
+ border-radius: 15px;
140
+ padding: 20px;
141
+ display: flex;
142
+ justify-content: space-between;
143
+ align-items: center;
144
+ }
145
+
146
+ .score-item {
147
+ text-align: center;
148
+ }
149
+
150
+ .score-value {
151
+ font-size: 28px;
152
+ font-weight: 700;
153
+ margin-bottom: 5px;
154
+ }
155
+
156
+ .score-label {
157
+ font-size: 14px;
158
+ opacity: 0.8;
159
+ }
160
+
161
+ .input-container {
162
+ display: flex;
163
+ flex-direction: column;
164
+ gap: 15px;
165
+ }
166
+
167
+ .input-group {
168
+ display: flex;
169
+ gap: 10px;
170
+ }
171
+
172
+ input {
173
+ flex: 1;
174
+ padding: 15px 20px;
175
+ border: none;
176
+ border-radius: 12px;
177
+ background: rgba(255, 255, 255, 0.1);
178
+ color: var(--light);
179
+ font-size: 16px;
180
+ outline: none;
181
+ transition: all 0.3s ease;
182
+ }
183
+
184
+ input::placeholder {
185
+ color: rgba(255, 255, 255, 0.6);
186
+ }
187
+
188
+ input:focus {
189
+ background: rgba(255, 255, 255, 0.15);
190
+ box-shadow: 0 0 0 2px var(--accent);
191
+ }
192
+
193
+ button {
194
+ padding: 15px 25px;
195
+ border: none;
196
+ border-radius: 12px;
197
+ background: var(--primary);
198
+ color: white;
199
+ font-weight: 600;
200
+ font-size: 16px;
201
+ cursor: pointer;
202
+ transition: all 0.3s ease;
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: center;
206
+ gap: 8px;
207
+ }
208
+
209
+ button:hover {
210
+ background: var(--secondary);
211
+ transform: translateY(-2px);
212
+ }
213
+
214
+ button:active {
215
+ transform: translateY(0);
216
+ }
217
+
218
+ button:disabled {
219
+ background: rgba(255, 255, 255, 0.2);
220
+ cursor: not-allowed;
221
+ transform: none;
222
+ }
223
+
224
+ .hint-container {
225
+ background: rgba(255, 255, 255, 0.1);
226
+ border-radius: 15px;
227
+ padding: 20px;
228
+ }
229
+
230
+ .hint-title {
231
+ display: flex;
232
+ align-items: center;
233
+ gap: 10px;
234
+ margin-bottom: 15px;
235
+ font-weight: 600;
236
+ }
237
+
238
+ .hint-text {
239
+ line-height: 1.6;
240
+ opacity: 0.9;
241
+ }
242
+
243
+ .result-container {
244
+ background: rgba(255, 255, 255, 0.1);
245
+ border-radius: 15px;
246
+ padding: 20px;
247
+ text-align: center;
248
+ display: none;
249
+ }
250
+
251
+ .result-icon {
252
+ font-size: 50px;
253
+ margin-bottom: 15px;
254
+ }
255
+
256
+ .result-text {
257
+ font-size: 18px;
258
+ margin-bottom: 20px;
259
+ }
260
+
261
+ .controls {
262
+ display: flex;
263
+ gap: 15px;
264
+ margin-top: 20px;
265
+ }
266
+
267
+ .controls button {
268
+ flex: 1;
269
+ }
270
+
271
+ .btn-success {
272
+ background: var(--success);
273
+ }
274
+
275
+ .btn-warning {
276
+ background: var(--warning);
277
+ }
278
+
279
+ .btn-danger {
280
+ background: var(--danger);
281
+ }
282
+
283
+ .fade-in {
284
+ animation: fadeIn 0.5s ease;
285
+ }
286
+
287
+ @keyframes fadeIn {
288
+ from { opacity: 0; transform: translateY(10px); }
289
+ to { opacity: 1; transform: translateY(0); }
290
+ }
291
+
292
+ .pulse {
293
+ animation: pulse 1.5s infinite;
294
+ }
295
+
296
+ @keyframes pulse {
297
+ 0% { transform: scale(1); }
298
+ 50% { transform: scale(1.05); }
299
+ 100% { transform: scale(1); }
300
+ }
301
+
302
+ .level-indicator {
303
+ display: flex;
304
+ justify-content: center;
305
+ gap: 10px;
306
+ margin-top: 15px;
307
+ }
308
+
309
+ .level-dot {
310
+ width: 12px;
311
+ height: 12px;
312
+ border-radius: 50%;
313
+ background: rgba(255, 255, 255, 0.3);
314
+ }
315
+
316
+ .level-dot.active {
317
+ background: var(--accent);
318
+ }
319
+ </style>
320
+ </head>
321
+ <body>
322
+ <div class="container">
323
+ <div class="header">
324
+ <div class="logo">
325
+ <i class="fas fa-globe-americas"></i>
326
+ <span>Guess the Location</span>
327
+ </div>
328
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link">Built with anycoder</a>
329
+ </div>
330
+
331
+ <div class="game-container">
332
+ <div class="image-container">
333
+ <div class="image-placeholder">
334
+ <i class="fas fa-map-marked-alt"></i>
335
+ <p>Get ready to guess the location!</p>
336
+ </div>
337
+ <img class="location-image" src="" alt="Location to guess" style="display: none;">
338
+ </div>
339
+
340
+ <div class="game-info">
341
+ <div class="score-container">
342
+ <div class="score-item">
343
+ <div class="score-value" id="score">0</div>
344
+ <div class="score-label">Score</div>
345
+ </div>
346
+ <div class="score-item">
347
+ <div class="score-value" id="round">1/5</div>
348
+ <div class="score-label">Round</div>
349
+ </div>
350
+ <div class="score-item">
351
+ <div class="score-value" id="streak">0</div>
352
+ <div class="score-label">Streak</div>
353
+ </div>
354
+ </div>
355
+
356
+ <div class="input-container">
357
+ <input type="text" id="guess-input" placeholder="Enter your guess...">
358
+ <div class="input-group">
359
+ <button id="submit-btn">
360
+ <i class="fas fa-paper-plane"></i>
361
+ Submit Guess
362
+ </button>
363
+ <button id="hint-btn">
364
+ <i class="fas fa-lightbulb"></i>
365
+ Hint
366
+ </button>
367
+ </div>
368
+ </div>
369
+
370
+ <div class="hint-container">
371
+ <div class="hint-title">
372
+ <i class="fas fa-info-circle"></i>
373
+ <span>Location Hint</span>
374
+ </div>
375
+ <div class="hint-text" id="hint-text">
376
+ Click the hint button to get a clue about this location.
377
+ </div>
378
+ </div>
379
+
380
+ <div class="result-container" id="result-container">
381
+ <div class="result-icon" id="result-icon"></div>
382
+ <div class="result-text" id="result-text"></div>
383
+ <div class="controls">
384
+ <button class="btn-success" id="next-btn">
385
+ <i class="fas fa-forward"></i>
386
+ Next Location
387
+ </button>
388
+ <button class="btn-warning" id="restart-btn">
389
+ <i class="fas fa-redo"></i>
390
+ Restart Game
391
+ </button>
392
+ </div>
393
+ </div>
394
+
395
+ <div class="level-indicator">
396
+ <div class="level-dot active"></div>
397
+ <div class="level-dot"></div>
398
+ <div class="level-dot"></div>
399
+ <div class="level-dot"></div>
400
+ <div class="level-dot"></div>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ </div>
405
+
406
+ <script>
407
+ // Game data - locations with images and hints
408
+ const locations = [
409
+ {
410
+ name: "Eiffel Tower",
411
+ image: "https://images.unsplash.com/photo-1543349689-9a4d426bee8e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80",
412
+ hint: "This iconic iron lattice tower is located in a European capital known as the City of Light.",
413
+ country: "France",
414
+ city: "Paris"
415
+ },
416
+ {
417
+ name: "Statue of Liberty",
418
+ image: "https://images.unsplash.com/photo-1547471080-7cc2caa01a7e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80",
419
+ hint: "This colossal neoclassical sculpture was a gift from France to the United States and stands on an island in New York Harbor.",
420
+ country: "United States",
421
+ city: "New York"
422
+ },
423
+ {
424
+ name: "Great Wall of China",
425
+ image: "https://images.unsplash.com/photo-1518638150340-f706e86654de?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80",
426
+ hint: "This ancient series of fortifications stretches across the northern borders of an Asian country.",
427
+ country: "China",
428
+ city: "Beijing (near)"
429
+ },
430
+ {
431
+ name: "Taj Mahal",
432
+ image: "https://images.unsplash.com/photo-1564507592333-c60657eea523?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80",
433
+ hint: "This ivory-white marble mausoleum was built by a Mughal emperor in memory of his favorite wife.",
434
+ country: "India",
435
+ city: "Agra"
436
+ },
437
+ {
438
+ name: "Sydney Opera House",
439
+ image: "https://images.unsplash.com/photo-1528072164453-f4e8ef0d475a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80",
440
+ hint: "This multi-venue performing arts centre is known for its distinctive shell-like roofs and is located in a major Australian city.",
441
+ country: "Australia",
442
+ city: "Sydney"
443
+ }
444
+ ];
445
+
446
+ // Game state
447
+ let currentLocationIndex = 0;
448
+ let score = 0;
449
+ let streak = 0;
450
+ let gameActive = true;
451
+ let hintsUsed = 0;
452
+
453
+ // DOM elements
454
+ const locationImage = document.querySelector('.location-image');
455
+ const imagePlaceholder = document.querySelector('.image-placeholder');
456
+ const guessInput = document.getElementById('guess-input');
457
+ const submitBtn = document.getElementById('submit-btn');
458
+ const hintBtn = document.getElementById('hint-btn');
459
+ const hintText = document.getElementById('hint-text');
460
+ const resultContainer = document.getElementById('result-container');
461
+ const resultIcon = document.getElementById('result-icon');
462
+ const resultText = document.getElementById('result-text');
463
+ const nextBtn = document.getElementById('next-btn');
464
+ const restartBtn = document.getElementById('restart-btn');
465
+ const scoreElement = document.getElementById('score');
466
+ const roundElement = document.getElementById('round');
467
+ const streakElement = document.getElementById('streak');
468
+ const levelDots = document.querySelectorAll('.level-dot');
469
+
470
+ // Initialize the game
471
+ function initGame() {
472
+ loadLocation(currentLocationIndex);
473
+ updateUI();
474
+ gameActive = true;
475
+ }
476
+
477
+ // Load a location
478
+ function loadLocation(index) {
479
+ const location = locations[index];
480
+
481
+ // Show loading state
482
+ locationImage.style.display = 'none';
483
+ imagePlaceholder.style.display = 'flex';
484
+
485
+ // Load image
486
+ locationImage.src = location.image;
487
+ locationImage.onload = function() {
488
+ imagePlaceholder.style.display = 'none';
489
+ locationImage.style.display = 'block';
490
+ locationImage.classList.add('fade-in');
491
+ };
492
+
493
+ // Reset hint
494
+ hintText.textContent = "Click the hint button to get a clue about this location.";
495
+ hintsUsed = 0;
496
+
497
+ // Clear input
498
+ guessInput.value = '';
499
+ guessInput.focus();
500
+
501
+ // Hide result container
502
+ resultContainer.style.display = 'none';
503
+
504
+ // Update level indicator
505
+ levelDots.forEach((dot, i) => {
506
+ if (i <= index) {
507
+ dot.classList.add('active');
508
+ } else {
509
+ dot.classList.remove('active');
510
+ }
511
+ });
512
+ }
513
+
514
+ // Update UI elements
515
+ function updateUI() {
516
+ scoreElement.textContent = score;
517
+ roundElement.textContent = `${currentLocationIndex + 1}/${locations.length}`;
518
+ streakElement.textContent = streak;
519
+ }
520
+
521
+ // Submit a guess
522
+ function submitGuess() {
523
+ if (!gameActive) return;
524
+
525
+ const guess = guessInput.value.trim().toLowerCase();
526
+ const correctLocation = locations[currentLocationIndex];
527
+
528
+ // Check if guess is correct
529
+ const isCorrect =
530
+ guess.includes(correctLocation.name.toLowerCase()) ||
531
+ guess.includes(correctLocation.country.toLowerCase()) ||
532
+ guess.includes(correctLocation.city.toLowerCase());
533
+
534
+ // Show result
535
+ showResult(isCorrect, correctLocation);
536
+
537
+ // Update score
538
+ if (isCorrect) {
539
+ score += 10 - (hintsUsed * 3);
540
+ streak++;
541
+ } else {
542
+ streak = 0;
543
+ }
544
+
545
+ updateUI();
546
+ gameActive = false;
547
+ }
548
+
549
+ // Show hint
550
+ function showHint() {
551
+ if (!gameActive || hintsUsed >= 2) return;
552
+
553
+ const correctLocation = locations[currentLocationIndex];
554
+
555
+ if (hintsUsed === 0) {
556
+ hintText.textContent = correctLocation.hint;
557
+ } else if (hintsUsed === 1) {
558
+ hintText.textContent = `This location is in ${correctLocation.country}.`;
559
+ }
560
+
561
+ hintsUsed++;
562
+ }
563
+
564
+ // Show result
565
+ function showResult(isCorrect, location) {
566
+ resultContainer.style.display = 'block';
567
+ resultContainer.classList.add('fade-in');
568
+
569
+ if (isCorrect) {
570
+ resultIcon.className = 'result-icon fas fa-check-circle';
571
+ resultIcon.style.color = 'var(--success)';
572
+ resultText.textContent = `Correct! This is the ${location.name} in ${location.city}, ${location.country}.`;
573
+ resultContainer.style.background = 'rgba(76, 201, 240, 0.2)';
574
+ } else {
575
+ resultIcon.className = 'result-icon fas fa-times-circle';
576
+ resultIcon.style.color = 'var(--danger)';
577
+ resultText.textContent = `Sorry, that's incorrect. This is the ${location.name} in ${location.city}, ${location.country}.`;
578
+ resultContainer.style.background = 'rgba(230, 57, 70, 0.2)';
579
+ }
580
+ }
581
+
582
+ // Next location
583
+ function nextLocation() {
584
+ if (currentLocationIndex < locations.length - 1) {
585
+ currentLocationIndex++;
586
+ loadLocation(currentLocationIndex);
587
+ gameActive = true;
588
+ } else {
589
+ // Game completed
590
+ showGameCompleted();
591
+ }
592
+ }
593
+
594
+ // Restart game
595
+ function restartGame() {
596
+ currentLocationIndex = 0;
597
+ score = 0;
598
+ streak = 0;
599
+ initGame();
600
+ }
601
+
602
+ // Show game completed
603
+ function showGameCompleted() {
604
+ resultContainer.style.display = 'block';
605
+ resultContainer.classList.add('fade-in');
606
+ resultIcon.className = 'result-icon fas fa-trophy';
607
+ resultIcon.style.color = 'var(--warning)';
608
+ resultText.textContent = `Congratulations! You completed the game with a score of ${score}.`;
609
+ resultContainer.style.background = 'rgba(248, 150, 30, 0.2)';
610
+
611
+ nextBtn.disabled = true;
612
+ nextBtn.innerHTML = '<i class="fas fa-flag-checkered"></i> Game Completed';
613
+ }
614
+
615
+ // Event listeners
616
+ submitBtn.addEventListener('click', submitGuess);
617
+ hintBtn.addEventListener('click', showHint);
618
+ nextBtn.addEventListener('click', nextLocation);
619
+ restartBtn.addEventListener('click', restartGame);
620
+
621
+ // Allow submitting with Enter key
622
+ guessInput.addEventListener('keypress', function(e) {
623
+ if (e.key === 'Enter') {
624
+ submitGuess();
625
+ }
626
+ });
627
+
628
+ // Initialize the game
629
+ initGame();
630
+ </script>
631
+ </body>
632
+ </html>