1 lines, no comments ยท 252 tokens, written in 2 seconds for $0.0006


1  let x, y;let xspeed, yspeed;let r = 25;let c;function setup() {createCanvas(400, 400);x = width / 2;y = height / 2;xspeed = 5;yspeed = 5;c = color(255, 0, 0);}function draw() {background(0);fill(c);ellipse(x, y, r * 2, r * 2);x += xspeed;y += yspeed;if (x + r > width || x - r < 0) {xspeed = -xspeed;c = color(random(255), random(255), random(255));}if (y + r > height || y - r < 0) {yspeed = -yspeed;c = color(random(255), random(255), random(255));}}