import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Beuteltierwelt here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Beuteltierwelt extends World
{
/**
* Constructor for objects of class Beuteltierwelt.
*
*/
public Beuteltierwelt()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(16, 9, 60);
addObject(new Beuteltier(), 0, 0);
for(int i = 0; i < 5;i++){
BlattHinzufügen();
}
}
public void BlattHinzufügen(){
addObject(new Blatt(), Greenfoot.getRandomNumber(16), Greenfoot.getRandomNumber(9));
}
public void löscheObjekte(){
list objekte = getObjects(null);
removeObjects(objekte);
setBackground("Game Over!.png");
}
}
At public void löscheObjekte there is a Problem with the word List : cannot find Symbol - class list, Why??
