-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
109 lines (100 loc) · 4.41 KB
/
index.html
File metadata and controls
109 lines (100 loc) · 4.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grid Runner</title>
<link rel="preload" as="image" href="option.webp" />
<link rel="preload" as="image" href="game.webp" />
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="main-container">
<div class="options-section">
<h1>Grid Runner</h1>
<div class="instructions-container">
<button class="instructions-button">Instructions</button>
<div class="instructions-popup">
<p>
1. Enter your User ID.<br>
2. Select the Size of the Grid and the Number of Mines.<br>
3. Click "Start Game" to begin and navigate the grid.<br>
4. If you step on a mine, you lose, so avoid the mines.<br>
5. Start from the top-left corner.<br>
6. Reach the bottom-right corner to win!
</p>
</div>
</div>
<div id="user-id">
<input type="text" id="userID" name="userID" placeholder="Enter your User ID" required>
</div>
<div id="grid-selection">
<select id="grid-size">
<option disabled selected>Grid Size</option>
<option value="3">3x3</option>
<option value="4">4x4</option>
<option value="5">5x5</option>
<option value="6">6x6</option>
<option value="7">7x7</option>
<option value="8">8x8</option>
<option value="9">9x9</option>
<option value="10">10x10</option>
</select>
</div>
<div id="mine-selection">
<select id="mine-count">
<option disabled selected>Number of Mines</option>
</select>
</div>
<div id="start-button">
<button id="start-game-btn">Start Game</button>
</div>
<div id="leaderboard">
<h2>Leaderboard</h2>
<table id="leaderboardTable">
<thead>
<tr>
<th>Rank</th>
<th>User ID</th>
<th>Tries</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<!-- Larger section for the game -->
<div class="game-section">
<div id="message" class="message"></div>
<div id="grid-container"></div>
<div class="tries-container">
<span class="round-label">Rounds Before Last Win:</span>
<div id="tries-box">
<span id="tries">0</span>
</div>
</div>
</div>
</div>
<!-- Move all scripts here -->
<script type="module" src="client/generateGrid.js" ></script>
<script type="module" src="client/generateDirection.js"></script>
<script type="module" src="client/gameState.js"></script>
<script type="module" src="client/triggerLosingAnimation.js" async></script>
<script type="module" src="client/triggerWinningAnimation.js" async></script>
<script type="module" src="client/chooseGridSize.js"></script>
<script type="module" src="client/chooseNumberOfMine.js"></script>
<script type="module" src="client/handleCellClick.js"></script>
<script type="module" src="client/createGrid.js"></script>
<script type="module" src="client/showGrid.js"></script>
<script type="module" src="client/movePlayer.js"></script>
<script type="module" src="client/randomMinePlacement.js"></script>
<script type="module" src="client/generateRandomPath.js"></script>
<script type="module" src="client/startGame.js"></script>
<script type="module" src="client/checkLoss.js" async></script>
<script type="module" src="client/checkWin.js" async></script>
<script type="module" src="client/additionalFunctionality.js"></script>
<script type="module" src="client/updateLeaderboard.js" async></script>
<script type="module" src="client/postScore.js" async></script>
</body>
</html>