xxxxxxxxxx
17
let x = 300, y = 200;
function setup() {
createCanvas(600, 400);
}
function draw() {
background(20);
ellipse(x, y, 25, 25);
// x++; // make the ball move to the right of the screen
// x--; // make the ball move to the left of the screen
// x = x + 1, y = y - 2/3;// make the ball move to the top right corner of the screen
// x = x - 1, y = y - 2/3;// make the ball move to the top left corner of the screen
// x = x + 1, y = y + 2/3;// make the ball move to the bottom right corner of the screen
// x = x - 1, y = y + 2/3;// make the ball move to the bottom left corner of the screen
x = x - 10, y = y + 20/3;// make the ball move 10 times faster
}