Mouse Game
float m = random(540);
float n = random(220);
int dim = 50;
void setup(){
size(640,320);
rectMode(CENTER);
}
void draw(){
background(0);
fill(0,200,200);
rect(m,n,dim*2,dim*2);
textSize(24);
fill(255);
text("Mouse",m-dim*4/5,n);
text("Here",m-dim*4/5,n+dim/2);
int x = mouseX;
int y = mouseY;
if((x>m-dim)&&(x<m+dim)&&(y>n-dim)&&(y<n+dim)){
background(0);
m = random(640);
n = random(320);
}
}