public NewWorld() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(800, 600, 1); prepare(); addObject(new Car1(),400,200); for(int i=1;i<10;i++){ addObject (new Snowman (),80*i, 30);} }


public NewWorld() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(800, 600, 1); prepare(); addObject(new Car1(),400,200); for(int i=1;i<10;i++){ addObject (new Snowman (),80*i, 30);} }
addObject (new Snowman(), getWidth()-30, 60*i);
if (Greenfoot.getRandomNumber (4) ==2){ setLocation (this.getX(),this.getY()+2);
setLocation (this.getX()-2,this.getY());