I'm trying to make a new level for the asteroid program. I'm using the getObjectsInRange method to attempt to find when there are no more asteroids left, so i can initiate my custom made NewLevel() method in the space class...but I keep getting errors, because of the error: unmatched variable type.
private void NewLevel()
{
List<Asteroid> asteroids = getObjectsInRange(225, Asteroid.class);
for (Asteroid asteroid : asteroids)
{
if (asteroid = asteroids )
{
Greenfoot.stop();
}
}
}

