I have the below code, the loop goes on forever, i want its just to run 100 times but it goes onto infinity! Can't seem to see why!?
float x;
float y;
void setup()
{
size(800,600);
background(0,0,0);
}
void draw()
{
translate(width/2, height/2);
stars();
}
void stars()
{
fill(255,255,255);
stroke(100);
x = random(-800, 800);
y = random(-600, 600);
for(int i=0;i<100;i++)
{
line(x,y,x,y);
}
}