<commit_before>(function (FOOL) {
    'use strict';

    /**
     *
     * @constructor
     */
    function Randomizer() {}

    /**
     * This method should mix the pack
     * @param {FOOL.classes.Game} game
     */
    Randomizer.prototype.shufflePack = function (game) {
        var pack = game.getPack();
        //todo: this method should mix the pack
    };

    FOOL.randomizer = new Randomizer();

})(FOOL);<commit_msg>Method for mixing has been added<commit_after>(function (FOOL) {
    'use strict';

    /**
     *
     * @constructor
     */
    function Randomizer() {}

    /**
     * This method should mix cards
     * @param {Array} cards
     */
    Randomizer.prototype.shuffleTalon = function (cards) {
        var i, mixedCards = mix(cards),
            length = mixedCards ? mixedCards.length : 0;
        for (i = 0; i < length; i += 1) {
            cards.push(mixedCards[i]);
        }
    };

    function mix(cards) {
        var randomNum, length = cards ? cards.length : 0, result = [];
        while (length) {
            randomNum = Math.random() * length;
            result.push(cards.splice(randomNum, 1)[0]);
            length -= 1;
        }
        return result;
    }

    FOOL.randomizer = new Randomizer();

})(FOOL);
{'fraction_non_alphanumeric': 0.1377672209026128, 'fraction_numerical': 0.0055423594615993665, 'mean_word_length': 1.8990825688073394, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '3812096', 'n_tokens_mistral': 396, 'n_tokens_neox': 378, 'n_words': 95}