hey,
Im new in greenfoot and Im at the crab. I hope someone of you can help me^^
ok, here is my problem:
if ( canSee(Spider.class) )
if ( canSee(Lobster.class) )
{
eat(Lobster.class);
Greenfoot.playSound("crunch.mp3");
getWorld().addObject(new Lobster(), 36,360);
getWorld().addObject(new Lobster(), 36,360);
}
it works great but after a while there are too many lobsters, so can I do it like that there are spawned up to like 5 lobster? so that there is only one spawned then there is one eaten?
and another thing I want to change is, that I have two players. the games end, when they have eaten 10 worms. And after one of them has eaten 10 I want to make it harder. the code looks like this:
public void act()
{
if(Greenfoot.getRandomNumber(100) < 3) {
addObject(new Worm(), Greenfoot.getRandomNumber(560),Greenfoot.getRandomNumber(560));
}
}
i want that, after the first "level" the 3 rise like up to 10 or 20. is it possible to make something like that?

