<commit_before>'use strict';

Format.$inject = [];
AboutCtrl.$inject = ['$scope'];
ChangeLogCtrl.$inject = ['$scope'];
module.exports = {
    format: Format,
    about: AboutCtrl,
    changeLog: ChangeLogCtrl
};

function Format() {
    return { 
        buildFormatForAnalyzeGame: buildFormatForAnalyzeGame,
        buildFormat: buildFormat
    };

    /// START PUBLIC
    function buildFormatForAnalyzeGame(gameInfo) { 
        var format = {};

        format.labels = buildLabelFunction(gameInfo.rounds);
        format.detailedOrdering = buildDetailedOrdering(gameInfo.rounds);
        format.detailedStats = buildDetailedStats(format.detailedOrdering, 
            format.labels, gameInfo.factions);
        format.simpleOrdering = buildSimpleOrdering(gameInfo.fireAndIceBonus);

        return format;
    }

    function buildFormat() { 
        return { labels: buildLabelFunction() }
    }
    /// END PUBLIC



    /// START PRIVATE
    // I could use this for localization
    function buildLabels(rounds) { 
        var a = new Array();

        //Factions
        a["swarmlings"] = "Swarmlings";
        a["mermaids"] = "Mermaids";
        a["witches"] = "Witches";
        a["auren"] = "Auren";
        a["dwarves"] = "Dwarves";
        a["engineers"] = "Engineers";
        a["chaosmagicians"] = "Chaos Magicians";
        a["giants"] = "Giants";
        a["nomads"] = "Nomads";
        a["fakirs"] = "Fakirs";
        a["halflings"] = "Halflings";
        a["cultists"] = "Cultists";
        a["darklings"] = "Darklings";
        a["alchemists"] = "Alchemists";
        a["yetis"] = "Yetis";
        a["icemaidens"] = "Ice Maidens";
        a["riverwalkers"] = "Riverwalkers";
        a["shapeshifters"] = "Shapeshifters";
        a["dragonlords"] = "Dragonlords";
        a["acolytes"] = "Acolytes";
        a["all"] = "All Factions";

        // simple
        a["starting"] = "Starting";
        a["round"] = "Round";
        a["bonus"] = "Bonus";
        a["town"] = "Town";
        a["advance"] = "Ship/Dig Track";
        a["endGameCult"] = "Cult Track";
        a["endGameNetwork"] = "Network";
        a["endGameResources"] = "Unused Resources";
        a["leech"] = "Leech";
        a["fav"] = "Favors";
        a["faction"] = "Faction";
        a["endGameBonus"] = "F&I End Bonus";
        a["unknown"] = "Unknown";

        // detailed
        a["bon6"] = "Bonus 6 (pass SH/SA * 4)";
        a["bon7"] = "Bonus 7 (pass TP * 2)";
        a["bon9"] = "Bonus 9 (pass D * 1)";
        a["bon10"] = "Bonus 10 (pass ship * 3)";
        a["advanceDig"] = "Advance Dig";
        a["advanceShip"] = "Advance Ship";
        a["endGameFire"] = "Fire Track";
        a["endGameWater"] = "Water Track";
        a["endGameEarth"] = "Earth Track";
        a["endGameAir"] = "Air Track";
        a["endGameConnectedClusters"] = "F&I Connected Clusters";
        a["endGameConnectedDistance"] = "F&I Connected Distance";
        a["endGameConnectedSaShDistance"] = "F&I Connected Sh/Sa Distance";
        a["endGameBuildingOnEdge"] = "F&I Building on Edge";
        a["fav10"] = "Favor 10 (TP >> 3)";
        a["fav11"] = "Favor 11 (D >> 2)";
        a["fav12"] = "Favor 12 (pass TP [0,2,2,3,4])"

        var s = new Array();
        s["SCORE1"] = "Score 1 (SPD >> 2) (1Earth > C)";
        s["SCORE2"] = "Score 2 (TOWN >> 5) (4Earth > SPD)";
        s["SCORE3"] = "Score 3 (D >> 2) (4Water > P)";
        s["SCORE4"] = "Score 4 (SH/SA >> 5) (2Fire > W)";
        s["SCORE5"] = "Score 5 (D >> 2) (4Fire > 4PW)";
        s["SCORE6"] = "Score 6 (TP >> 3) (4Water > SPD)";
        s["SCORE7"] = "Score 7 (SH/SA >> 5) (2Air > W)";
        s["SCORE8"] = "Score 8 (TP >> 3) (4Air > SPD)";<commit_msg>Fixing #15, a simple typo<commit_after>'use strict';

Format.$inject = [];
AboutCtrl.$inject = ['$scope'];
ChangeLogCtrl.$inject = ['$scope'];
module.exports = {
    format: Format,
    about: AboutCtrl,
    changeLog: ChangeLogCtrl
};

function Format() {
    return { 
        buildFormatForAnalyzeGame: buildFormatForAnalyzeGame,
        buildFormat: buildFormat
    };

    /// START PUBLIC
    function buildFormatForAnalyzeGame(gameInfo) { 
        var format = {};

        format.labels = buildLabelFunction(gameInfo.rounds);
        format.detailedOrdering = buildDetailedOrdering(gameInfo.rounds);
        format.detailedStats = buildDetailedStats(format.detailedOrdering, 
            format.labels, gameInfo.factions);
        format.simpleOrdering = buildSimpleOrdering(gameInfo.fireAndIceBonus);

        return format;
    }

    function buildFormat() { 
        return { labels: buildLabelFunction() }
    }
    /// END PUBLIC



    /// START PRIVATE
    // I could use this for localization
    function buildLabels(rounds) { 
        var a = new Array();

        //Factions
        a["swarmlings"] = "Swarmlings";
        a["mermaids"] = "Mermaids";
        a["witches"] = "Witches";
        a["auren"] = "Auren";
        a["dwarves"] = "Dwarves";
        a["engineers"] = "Engineers";
        a["chaosmagicians"] = "Chaos Magicians";
        a["giants"] = "Giants";
        a["nomads"] = "Nomads";
        a["fakirs"] = "Fakirs";
        a["halflings"] = "Halflings";
        a["cultists"] = "Cultists";
        a["darklings"] = "Darklings";
        a["alchemists"] = "Alchemists";
        a["yetis"] = "Yetis";
        a["icemaidens"] = "Ice Maidens";
        a["riverwalkers"] = "Riverwalkers";
        a["shapeshifters"] = "Shapeshifters";
        a["dragonlords"] = "Dragonlords";
        a["acolytes"] = "Acolytes";
        a["all"] = "All Factions";

        // simple
        a["starting"] = "Starting";
        a["round"] = "Round";
        a["bonus"] = "Bonus";
        a["town"] = "Town";
        a["advance"] = "Ship/Dig Track";
        a["endGameCult"] = "Cult Track";
        a["endGameNetwork"] = "Network";
        a["endGameResources"] = "Unused Resources";
        a["leech"] = "Leech";
        a["fav"] = "Favors";
        a["faction"] = "Faction";
        a["endGameBonus"] = "F&I End Bonus";
        a["unknown"] = "Unknown";

        // detailed
        a["bon6"] = "Bonus 6 (pass SH/SA * 4)";
        a["bon7"] = "Bonus 7 (pass TP * 2)";
        a["bon9"] = "Bonus 9 (pass D * 1)";
        a["bon10"] = "Bonus 10 (pass ship * 3)";
        a["advanceDig"] = "Advance Dig";
        a["advanceShip"] = "Advance Ship";
        a["endGameFire"] = "Fire Track";
        a["endGameWater"] = "Water Track";
        a["endGameEarth"] = "Earth Track";
        a["endGameAir"] = "Air Track";
        a["endGameConnectedClusters"] = "F&I Connected Clusters";
        a["endGameConnectedDistance"] = "F&I Connected Distance";
        a["endGameConnectedSaShDistance"] = "F&I Connected Sh/Sa Distance";
        a["endGameBuildingOnEdge"] = "F&I Building on Edge";
        a["fav10"] = "Favor 10 (TP >> 3)";
        a["fav11"] = "Favor 11 (D >> 2)";
        a["fav12"] = "Favor 12 (pass TP [0,2,3,3,4])"

        var s = new Array();
        s["SCORE1"] = "Score 1 (SPD >> 2) (1Earth > C)";
        s["SCORE2"] = "Score 2 (TOWN >> 5) (4Earth > SPD)";
        s["SCORE3"] = "Score 3 (D >> 2) (4Water > P)";
        s["SCORE4"] = "Score 4 (SH/SA >> 5) (2Fire > W)";
        s["SCORE5"] = "Score 5 (D >> 2) (4Fire > 4PW)";
        s["SCORE6"] = "Score 6 (TP >> 3) (4Water > SPD)";
        s["SCORE7"] = "Score 7 (SH/SA >> 5) (2Air > W)";
        s["SCORE8"] = "Score 8 (TP >> 3) (4Air > SPD)";
{'fraction_non_alphanumeric': 0.1855642337732292, 'fraction_numerical': 0.018044707783463506, 'mean_word_length': 2.3928734582000915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3472275', 'n_tokens_mistral': 2712, 'n_tokens_neox': 2526, 'n_words': 553}