-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlevel1.js
60 lines (51 loc) · 1.77 KB
/
level1.js
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
// Level 1 content is set
//LEVEL 1 javascript
sessionStorage.setItem("levelx", 1);
var GameSpeed = 150;
var TimeInSeconds = 90;
function setcanoncontent(){
ssno = Math.floor(Math.random() * 5) + 1;
switch(ssno){
case 1: canoncontent = ss1sum;
break;
case 2: canoncontent = ss2sum;
break;
case 3: canoncontent = ss3sum;
break;
case 4: canoncontent = ss4sum;
break;
case 5: canoncontent = ss5sum;
break;
}
canon.innerHTML = "<p style='color: white;padding-left:46px;'><b>" + canoncontent + "</b></p>";
}
function setss1content(){
r1 = Math.floor(Math.random() * 25) + 1;
r2 = Math.floor(Math.random() * 9) + 1;
ss1sum = r1 + r2;
ss1.innerHTML = "<p style='color: white;padding-top:53px;padding-left:85px;'>" + r1 + " + " + r2 + "</p>";
}
function setss2content(){
r1 = Math.floor(Math.random() * 25) + 1;
r2 = Math.floor(Math.random() * 9) + 1;
ss2sum = r1 + r2;
ss2.innerHTML = "<p style='color: white;padding-top:53px;padding-left:85px;'>" + r1 + " + " + r2 + "</p>";
}
function setss3content(){
r1 = Math.floor(Math.random() * 25) + 1;
r2 = Math.floor(Math.random() * 9) + 1;
ss3sum = r1 + r2;
ss3.innerHTML = "<p style='color: white;padding-top:53px;padding-left:85px;'>" + r1 + " + " + r2 + "</p>";
}
function setss4content(){
r1 = Math.floor(Math.random() * 25) + 1;
r2 = Math.floor(Math.random() * 9) + 1;
ss4sum = r1 + r2;
ss4.innerHTML = "<p style='color: white;padding-top:53px;padding-left:85px;'>" + r1 + " + " + r2 + "</p>";
}
function setss5content(){
r1 = Math.floor(Math.random() * 25) + 1;
r2 = Math.floor(Math.random() * 9) + 1;
ss5sum = r1 + r2;
ss5.innerHTML = "<p style='color: white;padding-top:53px;padding-left:85px;'>" + r1 + " + " + r2 + "</p>";
}