public void detectEdges()
{
GreenfootImage bg = getBackground();
for (int x =0; x< bg.getWidth()-1; x++)
{
for (int y = 0; y< bg.getHeight(); y++)
{
Color c = bg.getColorAt(x,y);
Color d = bg.getColorAt(x+1,y);
if ( Math.sqrt(Math.pow(c.getRed() - d.getRed(),2))+(Math.sqrt(Math.pow(c.getBlue() - d.getBlue(),2)))+(Math.sqrt(Math.pow(c.getGreen()-d.getGreen(),2))));
bg.setColorAt(x,y,c.WHITE);
}
}
}
