Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A groupstage tournament that automatically tiebreaks
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
gstb.js
package.json

README.md

Groupstage-Tb

npm status build status dependency status coverage status unstable

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.

Usage

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

Installation

Install locally from npm:

$ npm install groupstage-tb --save

Running tests

Install development dependencies

$ npm install

Run the tests

$ npm test

License

MIT-Licensed. See LICENSE file for details.

Something went wrong with that request. Please try again.