I'm trying to make a method that tells you if there is a specific Object at a specific location
I've seen this with List a few times now but when I use it it doesn't work. Greenfoot tells me that List is no actor. So I'm wondering do I need to create a List or do I need to import something so that this will work
public boolean occupied(int x, int y, Class clls){
List objects = getWorld().getObjectsAt(x, y, clls);
if (objects.isEmpty){
return false;
}
else {return true;}
}

