import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class MyWorld here. * * @author (your name) * @version (a version number or a date) */ public class Background extends World { /** * Constructor for objects of class MyWorld. * */ public Background() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 600, 1); setBackground(Background()); } public GreenfootImage Background() { GreenfootImage background = new GreenfootImage(getWidth(), getHeight()); background.setColor(Color.BLACK); for (int i = 0; i < 9; i++) { int [] x = {getWidth()/2, getWidth(), getWidth()*0}; int [] y = {getHeight()*0, 150+getHeight()/2, 150+getHeight()/2}; background.drawPolygon(x, y, 3); background.rotate(180); } return background; } }

