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);
}
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);
2019/10/7
tut-access-p1
2019/10/7
tut-access-p1
2019/10/7
tut-access-p1