-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
31 lines (28 loc) · 1.04 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Snake Game</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script>
<script type="text/javascript" src="sketch.js"></script>
<script type="text/javascript" src="snake.js"></script>
</head>
<body text="#000000" bgcolor="#434343" link="#808080" vlink="#eaeaea" alink="#000000">
<button id="easy" >Easy</button>
<button id="med" >Medium</button>
<button id="hard" >Hard</button>
<script>
document.getElementById('easy').onclick = function() {
frameRate(20);
};
document.getElementById('med').onclick = function() {
frameRate(40);
};
document.getElementById('hard').onclick = function() {
frameRate(100);
};
</script>
</body>
</html>