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

2020/12/5

Greenfoot programming Problem/ the code says that the Symbol populateWorld(); is not found. i dont understand why

Xarloz Xarloz

2020/12/5

#
import greenfoot.*; // imports Actor, World, Greenfoot, GreenfootImage import java.util.Random; public class CrabWorld extends World { // public static final Color pathColor = new Color(227, 202, 148); /** * Erzeugt die Krabbenwelt (den Strand). Unsere Welt hat eine Größe * von 560x560 Zellen, wobei jede Zelle nur ein Pixel groß ist. */ public CrabWorld() { super(560, 560, 1); populateWorld(); } } was ist hier falsch der zeigt mir ein Fehler bei populateWorld(); an
danpost danpost

2020/12/5

#
You are calling a method that currently does not exist for your CrabWorld. Add the following lines ( before the last } ):
public void populateWorld()
{
    // (1)
}
At (1), insert lines to create and add actors into your world.
You need to login to post a reply.