I'm trying to create a game for school that's somewhat like the "Crab Game" on here, so I was trying to enter in some code from the game (I made comments explaining where I got the pre-made code from) into one of my own actor classes. Anyways, there's a section of code regarding the method (my game is based on pathogens and white blood cells): public void lookForPathogen()
{
if(canSee(Pathogen.class))
{
eat(Pathogen.class);
pathogensEaten = pathogensEaten +1;
if(pathogensEaten == 8)
{Greenfoot.stop();
}
}
}
That's the whole method. Anyways, when I try to compile it, I get an error saying: "cannot find symbol - method canSee(java.land.Class<Pathogen>)" . From what I've learned in class, I know that it's indicating that I haven't defined the method basically, but when I look through the whole "Crab Game" I can't find any place where if(canSee(Worm.class)) is defined properly. How can I fix this error? I know it's a lot, but thanks for anyone's help!

