Hello everyone so I'm trying to use the enter key to reset my little crab world.
so I declare the reset like this in the World class.......
Reset reset = new Reset();
and this is the code for a sub-class to world call Reset........
public class Reset extends World
{
/**
* so this code is to reset the CrabWorld when the Enter key is press.
*/
public void Reset()
{
if (Greenfoot.isKeyDown("enter"));
Greenfoot.setWorld();
}
}
basically I want to reset my world when ever the enter key is press.
thank for the help....!

