I see a problem in eating a flower in coding. first one i gave get(class )showing error &eat(class) also showing error. because it was not in library of greenfoot.
how to include them in greenfoot library?
Normally, the method that goes along with the 'eat' method is called the 'canSee' method. These methods are found in the Animal class. You might just try using the 'isTouching(Class)' and the 'removeTouching(Class)' methods which are already a part of the Actor class which do basically the same thing.