private int timer; private int chance = 125; private void spawnAlien() { timer = (timer+1)%1500; if (timer == 0) chance = chance-10; int rand = Greenfoot.getRandomNumber(150); if (rand >=3) return; if (rand == 0) addObject(new Alien(), 870, 453); } public