-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdifficulty.html
56 lines (51 loc) · 2 KB
/
difficulty.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
<!DOCTYPE html>
<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" />
<title>Menu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="hsl(221 90% 98%)" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="Canvas" media="(prefers-color-scheme: dark)">
<meta name="description" content="🙂">
<link rel="stylesheet" href="/styles.css">
<script type="module" src="/graphics.js"></script>
<script type="module" src="/index.js"></script>
</head>
<body>
<ul class="threeD-button-set">
<li><button id="easy">Easy</button></li>
<li><button id="medium">Medium</button></li>
<li><button id="hard">Hard</button></li>
<li><button onclick="window.location.href='index.html'">Back</button></li>
</ul>
<script>
var difficulty = "easy"
var easy = document.getElementById("easy")
easy.addEventListener("click", function(){
difficulty="easy"
console.log(difficulty)
localStorage.setItem("difficulty", difficulty);
window.location.href='home.html'
});
var difficulty = "medium"
var medium = document.getElementById("medium")
medium.addEventListener("click", function(){
difficulty="medium"
console.log(difficulty)
localStorage.setItem("difficulty", difficulty);
window.location.href='home.html'
});
var graphics = "high"
var hard= document.getElementById("hard")
hard.addEventListener("click", function(){
difficulty="hard"
console.log(difficulty)
localStorage.setItem("difficulty", difficulty);
window.location.href='home.html'
});
</script>
</body>
</htre>