function checkLvlUp(character) {
    while (character.xp >= character.xpNext) {
        character.lvl++;
        increaseStats(character, 3);
        alert(character.vit + " " + character.str + " " + character.wis + " " + character.dex + " " + character.spe);
        character.xp -= character.xpNext;
        for (let i = 0; i <= levels.length; i++) {
            if (levels[i].lvl === character.lvl) {
                character.xpNext = levels[i].xp;
                break;
            }
        }
    }
}
/**
 * Checks if character can lvl up, and does so if true.
 * @param {Character} character the chosen character.
 */
Checks if character can lvl up, and does so if true.
@param {Character} character the chosen character.
Checks if character can lvl up and does so if true . @param { Character } character the chosen character .
function checkLvlUp(character) {
    while (character.xp >= character.xpNext) {
        character.lvl++;
        increaseStats(character, 3);
        alert(character.vit + " " + character.str + " " + character.wis + " " + character.dex + " " + character.spe);
        character.xp -= character.xpNext;
        for (let i = 0; i <= levels.length; i++) {
            if (levels[i].lvl === character.lvl) {
                character.xpNext = levels[i].xp;
                break;
            }
        }
    }
}
function checkLvlUp ( character ) { while ( character . xp >= character . xpNext ) { character . lvl ++ ; increaseStats ( character , 3 ) ; alert ( character . vit + " " + character . str + " " + character . wis + " " + character . dex + " " + character . spe ) ; character . xp -= character . xpNext ; for ( let i = 0 ; i <= levels . length ; i ++ ) { if ( levels [ i ] . lvl === character . lvl ) { character . xpNext = levels [ i ] . xp ; break ; } } } }
Checks if character can lvl up, and does so if true.
Checks if character can lvl up and does so if true .