SOURCE

let x=20;
let y=35;
let v=200;
let b=60;
function setup(){
    createCanvas(500,500);
    background(120,64,200,120);
}
function draw(){
    noStroke();
    rect(280,10,-290,50);
    rect(220,50,-65,350);
    rect(200,220,-160,50);
    rect(200,345,290,55);
    rect(400,45,-65,350);
    rect(250,160,290,55);

if(keyIsPressed){
        if(keyCode==37){
            x-=2;
        }
        else if(keyCode == 39){
            x+=2;
        }
        else if(keyCode ==38){
            y-=2;
        }
        else if(keyCode ==40){
            y+=2;
        }
}
        stroke(0);
    ellipse(x,y,30,30);
    }

    
console 命令行工具 X clear

                    
>
console