Commit 8f18d6c7 authored by Sander Kvenild's avatar Sander Kvenild
Browse files

Stopped bubbles spawning partly outside of canvas

parent ea281bf4
......@@ -72,6 +72,8 @@
let x = Math.floor(Math.random() * canvas.width);
let y = Math.floor(Math.random() * canvas.height);
let r = Math.floor(Math.random() * 40 + 10);
let x = Math.floor(Math.random() * canvas.width - r);
let y = Math.floor(Math.random() * canvas.height - r);
bobler.push(new Boble(x,y,r));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment