Closed GrimLothar closed 1 year ago
Hey! Sorry for the delay.
The match would of course have no winners, so I tried setting the match as a draw. Good news is that it allowed me to do it.
The lib is actually ignoring the result: "draw"
value when you use manager.update.match()
. It's not "allowing you to do it", it's just doing nothing silently. If you look at the JSON, the final match will still be running ("status": 2
), without any result
. So the viewer behaves correctly.
Second bad news is that when I try to get the final standings, for some reason it's just removing one of the final participants from the rank
That's weird because with my snippet, the lib throws a "Participant not found." error, since the final match doesn't have a winner. I'll add a better error message for this.
Would it be too hard to allow for this scenario to happen?
I won't even try to evaluate the difficulty for this, because I simply won't let this happen and won't accept a PR for it, I'm sorry. This is more than an "edge case": it's an invalid case in this format of tournament.
The [single elimination format] is less suited to games where draws are frequent. In chess, each fixture in a single-elimination tournament must be played over multiple matches, because draws are common, and because white has an advantage over black. In association football, games ending in a draw may be settled in extra time and eventually by a penalty shootout or by replaying the fixture. (Source: Wikipedia)
The only update I would be willing to do to the lib is to throw an error message when trying to set a draw
as a result in an elimination tournament (single and double elimination).
As you said this is an edge case for you, I'll let you support this on your side. If you really want to display this case with the viewer, I suggest you override the result with "opponent1": {"result": "loss"}, "opponent2": {"result": "loss"}
:
(This works because the viewer doesn't have any "tournament logic", it will simply display what you give to it.)
All online tournament management tools I know do not support this case either.
Thank you as always for your detailed responses! I fully understand your decision to not support this scenario. I agree it's super edge case. Will figure out what to do with it when/if it happens. Thanks!
Although it's definitely an edge case, we are seeing the possibility of a final match in an elimination tournament to have a no-show on both participants. After some thought, we figure that the best resolution in this case, would be for them both to share the 1st place.
The match would of course would have no winners, so I tried setting the match as a draw. Good news is that it allowed me to do it. Bad news is that the Brackets UI is not showing the match as finished. It's still showing it with the default dashes:
Second bad news is that when I try to get the final standings, for some reason it's just removing one of the final participants from the rank:
You can reference the above image as well for the full list of participants. It removed the
Ayrious2
participant.Would it be too hard to allow for this scenario to happen? And if you don't have the time to support it, do you mind sharing some pointers on what would need to be changed and I can try to make a PR myself?
Thanks!