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

Controlling the size of groups in a round robin stage #187

Open Qanpi opened 10 months ago

Qanpi commented 10 months ago

Hey!

This is a little urgent, since I'm in the middle of running a tournament and have just stumbled into this issue.

I'm trying to divide 14 participants into 4 groups for a round robin stage, like so: 4x4x3x3. However, no matter the seed ordering, I always end up with the following configuration instead: 4x4x4x2. As far as I know, the library does not expose any control over individual group sizes beyond that.

I wouldn't mind writing the code myself, but I'm wondering how feasible that patch would be. From what I gathered, this can't be fixed by adding a custom seed ordering, so I would have to change the group creation mechanism. Would that break something in the process, or is this a theoretical possibility?

Thanks

Qanpi commented 10 months ago

Alternatively, could I manually adjust the group_id of a match in the database?

Drarig29 commented 10 months ago

Yes you can change the group_id as you wish

Qanpi commented 10 months ago

Thank you for the quick answer.

In case others face a similar issue, a workaround is to manually change the group_id of several matches in one of the four-player groups to the two-player group. I also had to change the id's of opponents (ParticipantResult) and finally delete one extra match that was generated for the previously four-player group.

laukaichung commented 9 months ago

I hope this feature can get implemented soon.