xxxxxxxxxx
float score = 0;
float xPos;
float yPos;
float highScore = 0;
void setup(){
size(600,600);
xPos = random(0,width);
yPos = random(0,height);
}
void draw(){
background(49, 63, 59);
fill(255);
stroke(245, 81, 81);
strokeWeight(11);
ellipse(xPos,yPos,50,50);
textSize(100);
textAlign(CENTER,CENTER);
fill(171,170,167);
text("High score: "+highS core,width/2,height/2-100);
text(score,width/2,height/2);
text(30-millis()/1000,width/2,height/2+100);
if(millis() > 30000){
exit();
}
}
void mouseClicked(){
if(dist(xPos,yPos,mouseX,mouseY) < 25){
score =score + 1;
xPos = random(0,width);
yPos =random(0,hight);
}
}