Drarig29 / brackets-manager.js

A simple library to manage tournament brackets (round-robin, single elimination, double elimination).
https://drarig29.github.io/brackets-docs
MIT License
245 stars 38 forks source link

ordering random, new option? it could be... #202

Closed vecino398 closed 5 months ago

vecino398 commented 5 months ago

I suppose you won't have much time, but I leave you this proposal. When tournament participants register and do not reach the minimum number of brackets and have to fill out "BYE", it would be important to perform a random distribution. To avoid empty seeds in a row... at the end of creating the square brackets.

For now I continue to familiarize myself with the library. I learned javascript 15 years ago, node and ts I have to update myself. I apologize if the option exists and I have not seen it. ;Þ

Drarig29 commented 5 months ago

do not rich the minimum number of brackets

Do you mean "do not rich the expected number of participants in the bracket"?

at the end of creating the square brackets

What are square brackets?

empty seeds in a row

Do you mean when creating multiple brackets in a row? In that case, you should be responsible to randomize the seeding, which is given as a input to the library.

vecino398 commented 5 months ago

const: SeedOrdering[] = ['natural', 'reverse', 'half_shift', 'reverse_half_shift', 'pair_flip', 'inner_outer'];

defines a new random SeedOrdering mode. But as you say, we can pass the seeds in advance randomly and leave SeedOrdering = natural.

example: image

Drarig29 commented 5 months ago

Yes, I don't want to have anything random in the library 😁 going to close the issue