//globally
Crate crate1=new Crate();
Crate crate2=new Crate();
//act method
if(solo==1)
{
int rand=Greenfoot.getRandomNumber(r.length);
int rand2=Greenfoot.getRandomNumber(r2.length);
if(tank>0 && --tank ==0)addObject(new Tank(),r[rand],r2[rand2]);
if(tank==0 && getObjects(Tank.class).isEmpty())tank =60;
if(b>0 && --b ==0)addObject(new B(),r[rand],r2[rand2]);
if(b==0 && getObjects(B.class).isEmpty())b =60;
if(crate>0 && --crate ==0) {addObject(crate2,30,30); addObject(crate1,770,570);}
if(crate==0 && getObjects(Crate.class).isEmpty())crate =150;
if(bottimer>0 && --bottimer ==0) addObject(new EnemyTank(true,3), 695, 495);
if(bottimer==0 && getObjects(EnemyTank.class).isEmpty())bottimer =100;
if(bottimer>0 && --bottimer ==0) addObject(new EnemyCannon2(20,125), 695, 495);
if(bottimer==0 && getObjects(EnemyCannon2.class).isEmpty())bottimer =10;
if(bottimer1>0 && --bottimer1 ==0) addObject(new EnemyTank1(true,3), 105, 105);
if(bottimer1==0 && getObjects(EnemyTank1.class).isEmpty())bottimer1 =100;
if(bottimer1>0 && --bottimer1 ==0) addObject(new EnemyCannon(20,125), 105, 105);
if(bottimer1==0 && getObjects(EnemyCannon.class).isEmpty())bottimer1 =10;
}
