xxxxxxxxxx
var x = 60;
var y = 40;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
//Sky
background(15);
rect(0);
//Ground
fill(24, 38, 24);
rect(0, 300, 400, 150);
//Moon
let c = color(198, 204, 198);
if (y < 200) {
fill(198, 204, 198);
ellipse(x, y, 55, 55);
}
if (isKeyPressed) {
if (key == "ArrowUp") {
y--;
} else if (key == "ArrowDown") {
y++;
}
}
}