-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
46 lines (40 loc) · 1.02 KB
/
script.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
"use strict";
let something = 35;
function feature1() {
// do some other code
something += 34;
let x = 5;
let y = 4;
console.log(x+y);
}
function foo() {
let something = 7;
return something;
}
function main() {
loadAllImages();
window.location.reload();
}
async function loadAllImages() {
try {
await loadImage(bgImg, "./assets/bg.png");
await loadImage(playerImg, "./assets/adachi.png");
await loadImage(pipeImg, "./assets/shimamura.png");
animationLoop();
scoreboard.style.visibility = "visible";
loadingScreen.style.display = "none";
} catch (error) {
console.error("Loading Images Failed", error);
}
if (depth >= this.maxDepth) return;
node.nodeLeft = new Node(2 * node.value);
this.constructBinaryTree(node.nodeLeft, depth + 1)
node.nodeRight = new Node((2 * node.value) + 1);
this.constructBinaryTree(node.nodeRight, depth + 1)
}
function bar() {
if(x > cwidth - boxWidth) dx = -dx;
if(x < 0) dx = -dx;
if(y > cheight - boxHeight) dy = -dy;
if(y < 0) dy = -dy;
}