console
var x=250;
var y=200;
function setup() {
createCanvas(500, 500);
noStroke();
}
function draw(){
background(255)
fill(246,233,23)
ellipse(x,y,25,25)
if(keyIsPressed){
if(keyCode==37){
x-=5
}
else if(keyCode==39){
x+=5
}
else if(keyCode==38){
y-=5
}
else if(keyCode==40){
y+=5
}
}
fill(187,98,165)
beginShape();
vertex(0,0);
vertex(0,500);
vertex(500,500);
vertex(600,450);
vertex(50,450);
vertex(50,0);
endShape(CLOSE);
beginShape();
vertex(100,0);
vertex(500,0);
vertex(500,400);
vertex(450,400);
vertex(450,50);
vertex(100,50);
endShape(CLOSE);
beginShape();
vertex(100,100);
vertex(100,300);
vertex(300,300);
vertex(300,250);
vertex(150,250);
vertex(150,100);
endShape(CLOSE);
beginShape();
vertex(200,100);
vertex(500,100);
vertex(500,150);
vertex(200,150);
endShape(CLOSE);
beginShape();
vertex(350,150);
vertex(400,150);
vertex(400,500);
vertex(350,500);
endShape(CLOSE);
beginShape();
vertex(450,200);
vertex(500,200);
vertex(500,600);
vertex(450,600);
endShape(CLOSE);
beginShape();
vertex(100,350);
vertex(300,350);
vertex(300,500);
vertex(250,500);
vertex(250,400);
vertex(100,400);
endShape(CLOSE);
beginShape();
vertex(150,400);
vertex(200,400);
vertex(150,400);
vertex(150,450);
endShape(CLOSE);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>