🐃🐾 Checkpoint

./server.js:9949330/376
This commit is contained in:
Glitch (hello-express) 2020-03-16 02:18:22 +00:00
parent 89c282360b
commit c44d4fdc7a
1 changed files with 6 additions and 4 deletions

View File

@ -49,7 +49,7 @@ client.on("a", (msg) => {
switch (argcat) { switch (argcat) {
case "on": case "on":
ctoggle = true; ctoggle = true;
pos = {x: 5, y: 5}; pos = {x: (Math.random() * 100) - 50, y: (Math.random() * 100) - 50};
vel = {x: 2/5, y: 2/7}; vel = {x: 2/5, y: 2/7};
cursormode = "dvd"; cursormode = "dvd";
break; break;
@ -90,10 +90,12 @@ var cursorupdate = setInterval(function() {
if (pos.y <= -50) { if (pos.y <= -50) {
vel.y = -vel.y; vel.y = -vel.y;
} }
if (pos.x == -50 && pos.y == -50) {
if (pos.x = -50 && pos.y = -50) {
cornerhits += 1; cornerhits += 1;
} else if (pos.x == -50 || pos.x == 50) {
edgehits += 1;
} else if (pos.y == -50 || pos.y == 50) {
edgehits += 1;
} }
break; break;
} }