groupstage-tb

GroupStage tourney that tiebreaks until all done

Groupstage-Tb

An implementation of tourney. This module is basically GroupStage combined with as many TieBreaker rounds as is necessary to resolve ties.

In other words this module tiebreaks, and only makes sense to use over GroupStage if you know exactly how many players to progress to another tournament.

Use like GroupStage, but set limit

var GS = require('groupstage-tb');
var trn = new GS(16, { groupSize: 4, limit: 4 });
// score trn.matches until trn.stageDone() 
while (!trn.isDone()) {
  // trn will automatically tiebreak for us so we can pick group winner in each group 
  trn.createNextStage();
  // keep scoring trn.matches (now tiebreakers) until trn.stageDone() 
}
trn.complete(); // seal 

Install locally from npm:

$ npm install groupstage-tb --save

Install development dependencies

$ npm install

Run the tests

$ npm test

MIT-Licensed. See LICENSE file for details.