import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class BlueCar here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class BlueCar extends Actor
{
/**
* Act - do whatever the BlueCar wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
setImage("BlueCar!.png");
if(Greenfoot.getRandomNumber(90)>60)
{
move(5);
if (isAtEdge())
{
Greenfoot.playSound("Cheering.mp3");
setImage("1stplaceA.png");
Greenfoot.stop();
FlagMan flagman = new FlagMan();
getWorld().addObject(flagman,841,246);
}
}
if (getX()==900);
{
Fire fire = new Fire();
getWorld().addObject(fire,400,60);
}
}
}
