import greenfoot.*;
/**
* Write a description of class smallBlue here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class smallBlue extends Targets
{
public void act()
{
smallBlue();
yellowCubeChance();
}
public void yellowCubeChance()
{
int yellowCubeChance = Greenfoot.getRandomNumber(1);
if(yellowCubeChance == 1)
{
yellowCube yellowcube = new yellowCube();
getWorld().addObject(new yellowCube() , getX(), getY());
setRotation(90);
move(5);
}
}
public void smallBlue()
{
Actor smallBlue = getOneIntersectingObject(smallBlue.class);
if(smallBlue != null)
{
smallBlue smallblue = new smallBlue();
getWorld().removeObject(this);
}
}
}
