I am going to upload a game that I have been working on which has an issue I cannot seem to fix. Please can someone go over the code to see my mistake(s)? http://www.greenfoot.org/scenarios/8320
if (inWorld == true && atWorldEdge() == true && inWorldDelay <= 0)
{
((MazeWorld) getWorld()).shapesInWorld--;
getWorld().removeObject(this);
inWorld = false;
}
if (atWorldEdge() == false && mouse.getX() == this.getX() && mouse.getY() == this.getY() && colourChance == 0 && inWorld == true)
{
getWorld().removeObject(this);
((MazeWorld) getWorld()).shapesInWorld--;
inWorld = false;
}if (inWorld == true && atWorldEdge() == true && inWorldDelay <= 0)
{
((MazeWorld) getWorld()).shapesInWorld--;
getWorld().removeObject(this);
inWorld = false;
}
else if (atWorldEdge() == false && mouse.getX() == this.getX() && mouse.getY() == this.getY() && colourChance == 0 && inWorld == true)
{
getWorld().removeObject(this);
((MazeWorld) getWorld()).shapesInWorld--;
inWorld = false;
}