-
Notifications
You must be signed in to change notification settings - Fork 0
/
snake.html
40 lines (37 loc) · 1.17 KB
/
snake.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
<!DOCTYPE html>
<html>
<head>
<title>Snake</title>
<script type="text/javascript" src="./index.js"></script>
<link rel="stylesheet" type="text/css" href="./styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
text-align: center;
font-family: 'Courier';
background-color: white;
color: black;
}
#game {
border: solid black;
}
</style>
</head>
<form id="nft-input">
<input type="text" id="nft_url" placeholder="NFT Image URL">
<input onclick="runGame()" type="button" value="Submit" id="input-button">
<!--TEST URL FOR INPUT: https://hkgwtdvfyh.medianetwork.cloud/unsafe/30x30/filters:format(webp)/www.arweave.net/BA4rAIN16HVT99YcxS3G27CDL66DqwlM6y3HZbMJ1iI/image.png-->
</form>
<div id="img-div">
<h2 id="img-text">Your Image:</h2>
<canvas id="img-canvas">not supported</canvas>
</div>
<body>
<h1>Snake</h1>
<canvas id="game" width="441" height="441"></canvas>
<h3 id="score">Score: 0</h3>
</body>
<div id="newgame-div">
<button id="newgame-but"onclick="location.reload()" type="button">New Game</button>
</div>
</html>