xxxxxxxxxx
/*
Ziqi Zhou
Art 3001
mouse control
1/31/2017
zhouziqi000@gmail.com
*/
void setup(){
size(400,400);
}
void draw(){
noStroke();
background(200);
//left
rect(100,150,100,100);
if ((mouseX>100) && (mouseX<200) && (mouseY>150) && (mouseY<250)){
fill(255);
}
if ((mouseX>200) && (mouseX<300) && (mouseY>150) && (mouseY<250)){
fill(0);
}
//right
rect(200,150,100,100);
if ((mouseX>200) && (mouseX<300) && (mouseY>150) && (mouseY<250)){
fill(255);
}
if ((mouseX>100) && (mouseX<200) && (mouseY>150) && (mouseY<250)){
fill(0);
}
}