<commit_before>var RandomScheduler = require('../src/RandomScheduler');
var Tournament = require('../src/Tournament');

// (Match -> Team) -> (Match -> Team) -> (Number -> Number -> (Team, Team) ->
// Match) -> TournamentFacade
function TournamentFacade(getWinner, getLoser, createMatch) {
    this.getWinner = getWinner;
    this.getLoser = getLoser;
    this.createMatch = createMatch;
}

TournamentFacade.prototype = {

    // TournamentFacade ~> [Team] -> String -> Tournament
    createRandomTournament: function (teams, seed) {
        var scheduler = new RandomScheduler(seed);

        var tournament = new Tournament(
            this.getWinner,
            this.getLoser,
            this.createMatch,
            x => scheduler,
            teams
        );

        return tournament;
    },

    Tournament: Tournament
    
};

module.exports = TournamentFacade;<commit_msg>Adds more properties to tournament facade<commit_after>var RandomScheduler = require('../src/RandomScheduler');
var Tournament = require('../src/Tournament');
var Round = require('../src/Round');
var SortScheduler = require('../src/SortScheduler');
var SeedScheduler = require('../src/SeedScheduler');
var PairScheduler = require('../src/PairScheduler');
var RandomScheduler = require('../src/RandomScheduler');

// (Match -> Team) -> (Match -> Team) -> (Number -> Number -> (Team, Team) ->
// Match) -> TournamentFacade
function TournamentFacade(getWinner, getLoser, createMatch) {
    this.getWinner = getWinner;
    this.getLoser = getLoser;
    this.createMatch = createMatch;
}

TournamentFacade.prototype = {

    // TournamentFacade ~> [Team] -> String -> Tournament
    createRandomTournament: function (teams, seed) {
        var scheduler = new RandomScheduler(seed);

        var tournament = new Tournament(
            this.getWinner,
            this.getLoser,
            this.createMatch,
            x => scheduler,
            teams
        );

        return tournament;
    },

    Tournament: Tournament,
    Round: Round,
    SortScheduler: SortScheduler,
    SeedScheduler: SeedScheduler,
    PairScheduler: PairScheduler,
    RandomScheduler: RandomScheduler
    
};

module.exports = TournamentFacade;
{'fraction_non_alphanumeric': 0.12742882964301852, 'fraction_numerical': 0.0, 'mean_word_length': 2.857142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '4191954', 'n_tokens_mistral': 656, 'n_tokens_neox': 621, 'n_words': 139}