-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (68 loc) · 2.25 KB
/
index.html
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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="scripts/script.js" charset="utf-8"></script>
<link rel="stylesheet" href="styles/style.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=Concert+One&family=Orbitron:wght@400;700;900&family=Play:wght@400;700&display=swap" rel="stylesheet">
<title>Snake Game</title>
</head>
<body>
<div class="popup" id="lose">
<h3>You Lose!</h3>
<button id="new-game">Play Again?</button>
</div>
<div class="popup" id="rules">
<div class="exit"></div>
<h3>Game Rules</h3>
<ul>
<li>Start the game with either the UP, DOWN, LEFT or RIGHT arrow keys</li>
<li>Move your snake around the map with the UP, DOWN, LEFT, RIGHT arrow keys</li>
<li>Eat eggs to grow and gain points</li>
<li>Try to survive as long as possible by avoiding bumping into yourself</li>
</ul>
</div>
<!-- bg music -->
<audio id="music" src="audio/CFCF - Slippery Plastic Euphoric.mp3"></audio>
<!-- foodSound -->
<audio id="food" src="audio/food.wav"></audio>
<!-- loseSound -->
<audio id="lose-sound" src="audio/lose.wav"></audio>
<!-- Main -->
<header>
<h1>Snake</h1>
</header>
<!-- Container to hold the 2 sidebars and grid [a flex parent] -->
<section id="container">
<!-- left sidebar -->
<aside id="sidebar">
<div class="inside">
<div id="flex-child-one">
<h2>Score</h2>
<div id="score-span"></div>
</div>
<div id="flex-child-one">
<h2>Music</h2>
<button id="musicbtn">Play</button>
</div>
</div>
</aside>
<!-- Grid -->
<div id="grid">
<!-- Grid items go here -->
</div>
<!-- right sidebar -->
<aside id="sidebar" class="right">
<div class="inside">
<!-- <button id="start">Start</button> -->
<!-- <button id="pause">Pause</button> -->
<button id="rules-btn">Rules</button>
<button id="new">New Game</button>
</div>
</aside>
</section>
</body>
</html>