function setup() { createCanvas(400,400); background(255); strokeWeight(5); fill(0); line(200,0,200,400); line(0,200,400,200); } function draw() { if (mouseX < width/2 && mouseY < height/2){ fill(230,230,0); rect(0,0,200,200); } if(mouseX > width/2 && mouseY > height/2){ fill(230,0,0); rect(200,200,200,200); } if(mouseX > width/2 && mouseY < height/2){ fill(0,230,0); rect(0,200,200,200); } if(mouseY < width/2 && mouseY > height/2){ fill(0,0,230); rect(200,0,200,200); } }