This site requires JavaScript, please enable it in your browser!
Greenfoot back

marcriemer's Comments

Back to marcriemer's profile

private Counter theCounter; /** * Constructor for objects of class Space. */ public Space() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); theCounter = new Counter(); addObject(new Rocket(), 300, 340); addObject(theCounter, 40, 340); }
Otherwise, great tutorial...Thanks
Might I humbly suggest an alteration to the code in the Space class: addObject(new Counter(), 40, 340); this needs changing to: addObject(theCounter, 40, 340);