I am using this method to reset the world:
I need a way to make the world constructor take an int so I can set the level number. When I try:
I get an error that says:
"no suitable constructor found for World(no arguments)
constructor greenfoot.World.World(int, int, int) is not applicable
(actual and formal argument lists differ in length)
constructor greenfoot.World.World(int, int, int, boolean) is not applicable
(actual and formal argument lists differ in length)"
public void nextLevel(int thisLevel){
int nextLevel = thisLevel + 1;
Greenfoot.setWorld(new MyWorld());
}public MyWorld(int level){
}
