tournament-js / tournament

A tournament base class for static tournament types
MIT License
64 stars 13 forks source link

what does match: [0, 1] and match: [1, 0] mean? #22

Closed seiyria closed 8 years ago

seiyria commented 8 years ago

Paging through this document and I can't seem to figure out what this means. I'm seeing it in conjunction with p: [-1, #] and p: [#, -1].

I'm currently trying to grok a 17 person single elimination tournament.

clux commented 8 years ago

Yeah, the docs are probably due for an overhaul.

The scores (match.m) zip with the players (match.p), so the score of p[0] is m[0], and score of p[1] is m[1]. -1 in a player array is a walkover marker needed to fill an elimination bracket.

seiyria commented 8 years ago

Sorry, I'm still learning all the terminology here. What's a walkover marker?

clux commented 8 years ago

Say you are making an 6 player duel tournament, then you need quarter finals, semi-finals and a final. This forces 4 quarter finals, but you only have 6 players. Two of these matches are still created in the data structures, but they are never actually played. They are just there to indicate that two of the quarters are walkovers and the player who is not the -1 is auto-propagated to the semis.

seiyria commented 8 years ago

Ahhh, so that basically means these people just pass through to the next round? That makes sense, I think I get how the data works now.

Thanks! Feel free to close the issue; this solved my problem. Otherwise if you want to keep it open for doc overhaul that's fine too.

clux commented 8 years ago

Yeah, that's right. No worries.

I'll open a new issue for documentation.