farpenoodle / StreamControl

StreamControl
http://www.farpnut.net/streamcontrol
Other
75 stars 32 forks source link

Auto filling brackets from challonge #6

Closed ghost closed 9 years ago

ghost commented 9 years ago

Thought I'd make an issue to keep this separate. I've been playing with this and other stuff in the past few days. I was initially going to have separate widgets for setting player names and for setting brackets, but they'd both heavily use the whole tournament/match data loading thing that's there already so I'm probably just going to merge both ideas in to one widget. I'm just hoping the layout won't end up too big.

Anyway, to copy your suggestion from the other pull request #5:

<challongeBracket id="hi" x="50" y="50" width="300" height="150" >
  <!-- this is basically a list of matches for it to fill in starting from GF --> 
  <match playerOneWidget="gf2p1" playerOneScoreWidget="gf2p1s" playerTwoWidget="gf2p2" playerTwoScoreWidget="gf2p2s" />
  <match playerOneWidget="gfp1" playerOneScoreWidget="gfp1s" playerTwoWidget="gfp2" playerTwoScoreWidget="gfp2s" />
  <match playerOneWidget="lfp1" playerOneScoreWidget="lfp1s" playerTwoWidget="lfp2" playerTwoScoreWidget="lfp2s" />
 <!-- etc etc you can put as many of these in as you need. -->
</challongeBracket> 

I like the idea, but I think the list of matches should be marked somehow to remove any confusion as to what order they go in or with having to count them to find out what position it's in. Something like:

<challongeBracket id="hi" x="50" y="50" width="300" height="150" >
  <!-- this is basically a list of matches for it to fill in starting from GF --> 
  <grandFinal playerOneWidget="gfp1" playerOneScoreWidget="gfp1s" playerTwoWidget="gfp2" playerTwoScoreWidget="gfp2s" />
  <grandFinalReset playerOneWidget="gf2p1" playerOneScoreWidget="gf2p1s" playerTwoWidget="gf2p2" playerTwoScoreWidget="gf2p2s" />
  <winnersFinal playerOneWidget="wfp1" playerOneScoreWidget="wfp1s" playerTwoWidget="wfp2" playerTwoScoreWidget="wfp2s" />
  <losersFinal playerOneWidget="lfp1" playerOneScoreWidget="lfp1s" playerTwoWidget="lfp2" playerTwoScoreWidget="lfp2s" />
 <!-- etc etc you can put as many of these in as you need. -->
</challongeBracket>

I guess this would also have the benefit of being able to work with single elimination tournaments as well using differently named children.

What do you think?

farpenoodle commented 9 years ago

I think that's fine. Just that going past say winners and losers semis naming would start to get really fuzzy. I'm thinking either at that point the labels would just be cosmetic or the labels would just be cosmetic all the way. But yeah. Simply having the items named would make it much easier for people to read.

ghost commented 9 years ago

I finally got round to doing this so this isn't needed anymore.