forked from Pamblam/snek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (50 loc) · 1.73 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
<!DOCTYPE html>
<html>
<head>
<title>snek</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./index.css">
<link href="https://fonts.googleapis.com/css?family=Overpass+Mono" rel="stylesheet">
</head>
<body>
<div class="container">
<h1 class="title">SNEK</h1>
<div id="game">
<p class="subtitle">Spacebar to start. Arrow keys to steer. Eat the tiny tomatoes but don't run into the walls or yourself.</p>
<select name="resolution" id="resolution">
<option value="400/400">400x400</option>
<option value="480/720">480x720</option>
<option value="600/600">600x600</option>
<option value="800/600">800x600</option>
<option value="800/800">800x800</option>
<option value="800/1000">800x1000</option>
<option value="720/1028">720x1028</option>
<option value="1080/1920">1080x1920</option>
<option value="fullscreen">Window size</option>
</select><br>
<br>
<div class="canvas-container">
<canvas id="canvas"></canvas>
</div>
<p class='out-text'><span id='out'>welcome to snek!</span></p>
<button id="btn-restart" class="hide" onClick="location.reload()">Restart</button>
<p class="subtitle">Top Scores</p>
<ol id="scores"></ol>
</div>
<div id="getname">
<center>
<form id="nameform">
<p class="subtitle">Enter your name.</p>
<div>
<input id="username" placeholder="username" maxlength="10">
<button style="background-color: white; color: black; border: 2px solid green" type="submit" >Play</button>
</div>
</form>
</center>
</div>
</div>
<script src="classes.js"></script>
<script src="snek.js"></script>
</body>
</html>