package leigh.mud.engine;

/**
 * This class contains the data for an exit to a {@link Room}.
 *
 * @author Alex Leigh
 */
public class Exit {
    private final int destinationId;
    private final String desc;

    public Exit(int destinationId, String desc) {
        this.destinationId = destinationId;
        this.desc = desc;
    }

    /**
     * Return the destination for this exit at this time. Callers should not cache this information, as it may
     * change dynamically.
     */
    public int getDestinationId() {
        return destinationId;
    }

    /**
     * Return a description string for this exit.
     */
    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return "Exit{" +
                "destinationId=" + destinationId +
                ", desc='" + desc + '\'' +
                '}';
    }
}
