I am trying to create a math project and I want random numbers to come from the right side of the screen. I have created the following code in a subclass (called Background) of the World. Request you to help me with the right code.
(Numbers is the class)
(below the public Background())
int numbers={ 13,20,56,34,23,21};
public void act()
{
if(Greenfoot.getRandomNumber (100)<3)
{
for (int i=0; i<numbers.length; i++)
{
addObject(new Numbers(), 967, Greenfoot.getRandomNumber (531));
}
}
}

