Hi, I have to make a program that involves a bunch of blue and red circles spawning in, but the catch is the red circles have to form a shape of a circle in the corner of the screen Like this
here's the code I have right now
public void getrandom(){
int x=Greenfoot.getRandomNumber(1001);
int y=Greenfoot.getRandomNumber(1001);
double d=Math.sqrt((x*x)+(y*y));
for(int i = 0; i<100; i++) {
if(d <= 1){
blue_dot Blue = new blue_dot();
getWorld().addObject(Blue, x,y);
Blue.setImage(red);
inside_d++;
}else{
blue_dot Blue = new blue_dot();
getWorld().addObject(Blue, x,y);
}}
}
