package mug12; /** * The world for Multi-User Grinnell. Although it violates * some standards of object-oriented design, we use the world * as a central repository for all our objects. * * @author CSC152 2004F */ public interface WorldInterface { /** * Indicate that some time has passed. * void elapse(); */ // Methods for "normal" UI to interact with. /** * Determine what time it is in the world. * public Time time(); /** * Get the location of someone in the world. */ public String getLocation(String name); /** * Get the description of something (a noun). */ public String describe(String name); /** * Find all the people in a room */ public String[] listPeople(String room); /** * find all the things in a room */ public String[] listContents(String room); /** * Record that an interaction has happened. Return a comment on the * results of the action. * * @exception * If the action is invalid or the object is invalid or ... */ public String perform(Action tim) throws InvalidVerbException, InvalidTargetException; /** * Specify the broadcaster that we use for sending broadcast * messages. */ public void specifyBroadcaster(Broadcaster jonstewart); } // interface World