npm i tournament-generator --save
yarn add tournament-generator
How to use
The next code snippet shows how to create a
// Import tournament generator;// List of all teams;// Generate and get games;
The next snippet shows the possible content of the
At the moment the only supported property is the type and there are three possible tournament types to generate:
double-round: A championship competition where teams play against each other twice, one at home and one away.
single-round: A championship competition where teams play against each other one single time.
simple-cup: A cup competition that basically generates the first round (or the first two rounds) randomly.
You can see a better description of the competition types here.
To run the package tests, you just need to execute:
In the future, the objective is to:
- Add draw pots to cup competitions which brings the objective of creating cups based on groups.
- Add plugin support for entire competitions like Champions League or Europa League. **
- Add full competition management like classifications, leaderboards, etc. **
** Not sure if it makes sense to be integrated in this package or on a different one.