Students

Circle Stopper

Nice the first app that has an if statement – draw a circle 100 times and then stops

int James_x;
int James_y;
int count;
void setup()
{
count=0;

size(800,800);
background(255,255,255);
James_x=250;
James_y=25;
}
void draw(){
// if (mousePressed){
//fill(250,0,0);
// }else
stroke(0);

count=count+1;
fill(0,500,500);
if(count < 100)
ellipse(mouseX,mouseY,100,100);

//fill(500,0,0);
//rect(mouseX,mouseY,50,500);
//fill(0,250,250);
//ellipse(mouseX,mouseY,500,50);
}

Advertisements