public void act()     
    {    
      // spawn ships random
        if(Greenfoot.getRandomNumber(10000) < 10) {    
            addObject(new ship1(), Greenfoot.getRandomNumber(900),0);  
        }   
        
        if(Greenfoot.getRandomNumber(10000) < 10) {    
            addObject(new ship2(), Greenfoot.getRandomNumber(900),0);     
        } 
        
        if(Greenfoot.getRandomNumber(10000) < 10) {    
            addObject(new ship3(), Greenfoot.getRandomNumber(900),0);     
        } 
        
        if(Greenfoot.getRandomNumber(10000) < 10) {    
            addObject(new ship4(), Greenfoot.getRandomNumber(900),0);     
        } 
    }