This is an 'idea' in page 55 of the textbook - 'making new worms pop up when one is eaten'. Can't figure out ... how and where I should use getWorld()?


1 2 3 | World world = getWorld(); int worldWidth = world.getWidth(); int worldHeight = world.getHeight(); |
1 2 | int worldWidth = getWorld().getWidth(); int worldHeight = getWorld().getHeight(); |