Hello i have this code=:
I am trying to spawn an "asteroid" randomly along the x axis that will then fall to the ground. I have imported java.util.Random btw..
boolean death = false;
Random generator = new Random();
int x = 0;
do{
for(int i = 0; i < 10; i++){
x = generator.nextInt(1600) +1;
addObject(new dot_red (), x, 10);
}
}while(death = false);

