src/main/java/cursor/rybak/game/UserInteraction.java
/**
     * upgrade particular characteristic
     *
     * @param characteristic concrete key needs to upgrade
     * @param hero           instance of particular hero
     * @param points         upgrade points
     */
upgrade particular characteristic
@param characteristic concrete key needs to upgrade
@param hero           instance of particular hero
@param points         upgrade points
upgrade particular characteristic @param characteristic concrete key needs to upgrade @param hero instance of particular hero @param points upgrade points
private static void upgradeCharacteristic(String characteristic, AbstractRace hero, int points) {
        if ("charisma".equals(characteristic)) hero.setCharisma(points);
        if ("stamina".equals(characteristic)) hero.setStamina(points);
        if ("intellect".equals(characteristic)) hero.setIntellect(points);
        if ("agility".equals(characteristic)) hero.setAgility(points);
        if ("concentration".equals(characteristic)) hero.setConcentration(points);
    }
private static void upgradeCharacteristic ( String characteristic , AbstractRace hero , int points ) { if ( "charisma" . equals ( characteristic ) ) hero . setCharisma ( points ) ; if ( "stamina" . equals ( characteristic ) ) hero . setStamina ( points ) ; if ( "intellect" . equals ( characteristic ) ) hero . setIntellect ( points ) ; if ( "agility" . equals ( characteristic ) ) hero . setAgility ( points ) ; if ( "concentration" . equals ( characteristic ) ) hero . setConcentration ( points ) ; }
upgrade particular characteristic
 @param characteristic concrete key needs to upgrade
 @param hero           instance of particular hero
 @param points         upgrade points
upgrade particular characteristic @param characteristic concrete key needs to upgrade @param hero instance of particular hero @param points upgrade points