I am new to programming and we have an assignment about making a Greenfoot game. now I am trying to set some colors to MyWorld
but having some problems.
My code in MyWorld
file is
public MyWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 1);
GreenfootImage bg = new GreenfootImage(600, 400);
bg.setColor(new Color(0, 0, 250, 9));
setImage(bg);
}
and it is returning an error
cannot find symbol - method setImage(greenfoot.GreenfootImage)
The same code on one of the Actor
classes working normally.
public BgCells(){
GreenfootImage bgBig = new GreenfootImage(200, 200);
bgBig.setColor(new Color(0, 0, 250));
setImage(bgBig);
}