This site requires JavaScript, please enable it in your browser!
Greenfoot back
Metal_Fox
Metal_Fox wrote ...

2013/4/14

problem with "atWorldEdge and canSee"

Metal_Fox Metal_Fox

2013/4/14

#
I'm having a difficulty with the methods atWorldEdge and canSee. I watched a video( Lettuce is good for you) of Michael Kolling and i tried to do the same but when i try to compile it gives me an error at the method atWorldEdge and then when i erased it, it gives me error to canSee method. Im confused because i did the same thing as in the video but its not working.
Gevater_Tod4711 Gevater_Tod4711

2013/4/14

#
Probably these methods aren't included in your animal class. Can you post the code of this class too?
danpost danpost

2013/4/14

#
@Metal_Fox, just copy/paste the code in the 'Post a reply' box. Follow it with an immediate closing code tag: and place an opening code tag before it:
Metal_Fox Metal_Fox

2013/4/14

#
The code of the animal class is this :
import greenfoot.*;  


public class Animal extends Actor
{
    public void act() 
    {
        
    }    
}
but it doeshnt have any code at all. And i dont know what to write in the animal class in order to make the turtle eat the apple. Maybe i should write these methods in the animal class too but i dont know what exactly to write. Help :(
danpost danpost

2013/4/14

#
Remove your Animal class from the scenario. Then, in the menubar select 'Edit'>'Import Class...' and choose the Animal class from the list and import it. Finally compile your scenario and run.
You need to login to post a reply.