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 MyWorld extends World { int x; int y; GreenfootImage background; /** * Constructor for objects of class MyWorld. * */ public MyWorld() { // Create a new world with 1600x1200 cells with a cell size of 1x1 pixels. super(1600, 1200, 1); x = getWidth()/2; y = getHeight()/2; //adds the image for the background background = new GreenfootImage("space.png"); //sets the image setImage(background); // makes a new instance for rocket addObject(new Rocket(),getWidth()/2,getHeight()/2); } }