/** * MapSpace.java * An interface that specifies classes that * represent a location on the Legend of * Zelba map. * @version .1 * @author Tarsem S. Purewal Jr. */ import java.util.Random; public interface MapSpace { //This will generate random events that occur //on landing or on leaving the map space final static Random generator = new Random(); /** * This method specifies what occurs when * link enters into this map space. * @param link a reference to the character entering */ public abstract void onLanding(Link link); /** * This method specifies what occurs when * link leaves this map space. * @param link a reference to the character leaving */ public abstract void onLeaving(Link link); /** * This method returns the name of this MapSpace * @return the name of this MapSpace */ public abstract String getName(); }