/**
 * Multimud Helper.
 * 
 * Copyright (C) 2009 Benjamin Lerman<br>
 * Copyright (C) 2009 Jacques ???
 * 
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.ambre.multimud_helper.bean;

/**
 * Represents the different skill level that a trainer can offer.
 */
public enum SkillLevel {

    /**
     * not learned
     */
    NOT_LEARNED,
    /**
     * awful
     */
    AWFUL,
    /**
     * bad
     */
    BAD,
    /**
     * poor
     */
    POOR,
    /**
     * average
     */
    AVERAGE,
    /**
     * intermediate
     */
    INTERMEDIATE,
    /**
     * fair
     */
    FAIR,
    /**
     * good
     */
    GOOD,
    /**
     * very good
     */
    VERY_GOOD,
    /**
     * superb
     */
    SUPERB,
    /**
     * magnificent
     */
    MAGNIFICENT,
    /**
     * half divine
     */
    HALF_DIVINE,
    /**
     * divine
     */
    DIVINE;

    public static SkillLevel parseSkillLevel(String skillLevel) {
        return SkillLevel.valueOf(skillLevel.toUpperCase().replaceAll(" ", "_"));
    }

    /**
     * {@inheritedDoc}
     */
    @Override
    public String toString() {
        return name().toLowerCase().replaceAll("_", " ");
    }
}
