function sortBySpeed() {
    let combatants = [];
    for (let i = 0; i < currentCharacters.length; i++) {
        combatants.push(currentCharacters[i]);
    }
    for (let j = 0; j < currentMonsters.length; j++) {
        combatants.push(currentMonsters[j]);
    }
    combatantsSorted = combatants.sort(function (a, b) {
        return b.spe - a.spe;
    });
    currentUnitTurn = 0;

}
/**
 * Creates a battle order queue based on combatants speed.
 */
Creates a battle order queue based on combatants speed.
Creates a battle order queue based on combatants speed .
function sortBySpeed() {
    let combatants = [];
    for (let i = 0; i < currentCharacters.length; i++) {
        combatants.push(currentCharacters[i]);
    }
    for (let j = 0; j < currentMonsters.length; j++) {
        combatants.push(currentMonsters[j]);
    }
    combatantsSorted = combatants.sort(function (a, b) {
        return b.spe - a.spe;
    });
    currentUnitTurn = 0;
}
function sortBySpeed ( ) { let combatants = [ ] ; for ( let i = 0 ; i < currentCharacters . length ; i ++ ) { combatants . push ( currentCharacters [ i ] ) ; } for ( let j = 0 ; j < currentMonsters . length ; j ++ ) { combatants . push ( currentMonsters [ j ] ) ; } combatantsSorted = combatants . sort ( function ( a , b ) { return b . spe - a . spe ; } ) ; currentUnitTurn = 0 ; }
Creates a battle order queue based on combatants speed.
Creates a battle order queue based on combatants speed .