Hello,
I have a question and I am beginner as you can see.
My plan: If a Wombat eats a Leaf, the Programm creates new leafs automatically.
I hope you understand what I try to ask.
Here is my code. If I try this code, I do not get an message that the code is wrong.
But if the wombat eats a leaf, the programm does not automatically create new leafs.
Here is my code that does not really work:
Thank you for help!
public void act()
{
if(Leaf.class == null)
{
addObject(new Leaf(),Greenfoot.getRandomNumber(560),Greenfoot.getRandomNumber(560));
}
}

