For my assignment I need to add a win screen without having a whole bunch of worlds so I have tried to use getWorld().addObject(Win.class); though it keeps coming up with an error if you could please tell me what I'm doing wrong that would help
World world = getWorld(); // getting reference to world world.removeObjects(getWorld().getObjects(null)); // removing all objects from world world.addObject(new Win(), world.getWidth()/2, world.getHeight()/2); // adding Win object to world