Package Exports
- @gaumala/swiss-rounds
- @gaumala/swiss-rounds/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gaumala/swiss-rounds) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
swiss-rounds 
Swiss rounds algorithm for TCG events.
Usage
import * as swr from '@GAumala/swiss-rounds'
// first create the tournament with a list of participant names
const t1 = swr.createTournament([
'alice',
'bob',
'charlie',
'daniel',
])
// check current round matches:
t1.rounds[t1.rounds.length - 1]
// submit match results
const t2 = swr.submitScores(t1, 0, 3, 0)
const t3 = swr.submitScores(t2, 1, 0, 3)
// generate pairings for next round
const t4 = swr.computeNextRound(t3)
// submit match results
const t5 = swr.submitScores(t4, 0, 3, 0)
const t6 = swr.submitScores(t5, 1, 0, 3)
// print final placings list
swr.computePlacings(t6)