import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* A bit of empty space for bubbles to float in.
*
* @author (Gurjeet Singh)
* @version (22991720)
*/
public class Space extends World
{
/**
* Create Space. Make it black.
*/
public Space()
{
super(900, 600, 1);
getBackground().setColor(Color.BLACK);
getBackground().fill();
setup();
}
/**
* Create 21 bubbles of random size diagonally
*/
private void setup()
{
int i=0;
while(i<21)
{
Bubble bubble = new Bubble();
addObject(bubble,i*45,i*30);
i++;
}
int a=0;
while(a<10)
{
Bubbl bubble(a*10+10) = new Bubble();
addObject(bubble(a*10+10),100+a*40,11);
a++;
}
}
}
