Hello!
I am creating a program which places an object on the World grid but it does not instantiate on its own...:-( Usually, when I save, close and reopen the program it automatically instantiates the world grid, but not this time. What am I missing?
Here is the code in myWorld object:
And here is the construction method of my ColorPatch subclass:
Thanks!
1 2 3 4 5 6 | public MyWorld() { super ( 800 , 600 , 1 ); ColorPatch colorpatch = new ColorPatch(); addObject(colorpatch, 200 , 200 ); } |
1 2 3 4 | public ColorPatch() { setImage ( new GreenfootImage( 200 , 200 )); } |