package mug13; /** * Ways to build a world. * */ public interface WorldBuilder { // Methods for constructing the world. /** * Add Person to world */ public void addPerson(Person bob) throws NameTakenException; /** * Remove Person from world */ public void removePerson(String bob); /** * Add Person to world */ public void addThing(Thing jim) throws NameTakenException; /** * Remove Person from world */ public void removeThing(String jim); /** * Add a new location. */ public void addLocation(Place loc) throws NameTakenException; /** * Remove an existing location. */ public void removeLocation(String loc); /** * Maps names to objects */ public Noun mapNoun(String name) throws NotHereException; public Place mapPlace(String name) throws NotHereException; public ThingPerson mapThingPerson(String name) throws NotHereException; public Person mapPerson(String name) throws NotHereException; public Thing mapThing(String name) throws NotHereException; /** * Maps verb names to the appropriat verb */ public Verb mapVerb(String verb) throws InvalidVerbException; } // interface WorldBuilder