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; /** * 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 GreenfootImage background = new GreenfootImage("space.png"); // makes a new instance for rocket Rocket rocket = new Rocket (); addObject(rocket,x,y); } public void movements() { if(Greenfoot.isKeyDown("w")) { } if(Greenfoot.isKeyDown("s")) { } if(Greenfoot.isKeyDown("a")) { } if(Greenfoot.isKeyDown("d")) { } } }