-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgame.html
More file actions
76 lines (65 loc) · 2.24 KB
/
Copy pathgame.html
File metadata and controls
76 lines (65 loc) · 2.24 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Classic Snake Game</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/home.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Shadows+Into+Light&display=swap" rel="stylesheet">
</head>
<body class="game-page">
<header>
<nav>
<ul class="nav-ul">
<li class="nav-link"><a href="index.html">Home</a></li>
<li class="nav-link"><a href="game.html">Game</a></li>
<li class="nav-link"><a href="scores.html">Scores</a></li>
</ul>
</nav>
<h1 class="main-heading"><em class="name-em">The East Code:</em> Classic Snake Game</h1>
</header>
<main>
<div class="player-name">
<h1 id="player-name"></h1>
</div>
<div class="game-card">
<canvas id="gameCanvas" width="600" height="600"></canvas>
<div class="score-container">
<div class="score-box" id="highScore">
<p>High Score</p>
<p>0</p>
</div>
<div class="score-box" id="currentScore">
<p>Current Score</p>
<p>0</p>
</div>
<div class="toggle-container">
<div class="tutorial-container" id="tutorialContainer">
<h2>How to Play</h2>
<p>Use the arrow keys to control the snake:</p>
<ul>
<li>↑ - Move Up</li>
<li>↓ - Move Down</li>
<li>← - Move Left</li>
<li>→ - Move Right</li>
</ul>
<p>Press the "GO!" button to start the game and "STOP" to end the game.</p>
</div>
<button class="toggle-tutorial" onclick="toggleTutorial()">How To Play</button>
</div>
</div>
</div>
<div class="controls">
<button class="start" id="start">GO!</button>
<button class="stop" id="reset">STOP</button>
</div>
</main>
<footer>
<p>© 2023 The EastCode. All rights reserved.</p>
</footer>
<script src="js/app.js"></script>
</body>
</html>