as per my instructions i need to use for loops in this i imported java.awt.* and greenfoot.* and my screen size is 600,400,1.
TIA,
flash
public void triangles()
{
GreenfootImage bg = new GreenfootImage(getBackground());
for (int x=0; x<20; x++)
{
for (int y=0; y<20-x; y++)
{
bg.setColorAt(x,y,Color.GREEN);
}
}
}
