Correct way to apply BYEs for Tournament #130
-
Scenario: Tournament criteria:
But would like to handle the case such that a tournament is possible not having the exact size of participants to join the tournament. For example, there are 6 people to join. Before the tournament starts, I have a Confirm Seeding function so that the tournament only can be started once it is confirmed seeding. brackets-manager.js/src/types.ts Lines 23 to 26 in 14df8eb From the above code and comment indicate that I have to set Implementation: To fill BYEs as the mentioned scenario above, I am implemented the UPDATE logic to the database with: If Stage is Single Elimination / Double Elimination type:
If Stage is Round_Robin type:
Question: This question is related to one issue I faced now when trying to update the match game's result for the further round which also will reflect updates to the previous match/match game for archiving. I would further elaborate on the issue faced once confirm the implementation logic above is correct. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I'm not sure I understand why you want to do things on your own, especially the BYE handling. If you put This should work both with You can have a look at the test files, and search for "BYE". You'll see a bunch of use cases with BYEs. |
Beta Was this translation helpful? Give feedback.
-
No it's not correct because you don't handle BYE propagation. Setting a BYE is not enough: you also need to make an opponent win automatically against a BYE, and such recursively through the upcoming matches. If you have a BYE against a BYE, then it creates a new BYE, and the upcoming match must be winned by the opponent which is against the created BYE. So no, your solution is not enough and you may use what I told you instead (recreate the stage to "confirm" the seeding). This will handle all what I said above. |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand why you want to do things on your own, especially the BYE handling.
If you put
null
values in a seeding, it should work directly, without you writing code for it.This should work both with
manager.create()
andmanager.update.seeding()
.You can have a look at the test files, and search for "BYE". You'll see a bunch of use cases with BYEs.