kevintxwu / outgame-rails

Super cool application!
0 stars 0 forks source link

Brackets TODO and progress updates #15

Closed dwarrier closed 10 years ago

dwarrier commented 10 years ago

Kevin,

I'm going to try and set up the functionality for automatic brackets. I have a couple of questions.

Can we change the win/lose interaction a little? I don't think it makes sense to enter two letters for the results of each match, because if one player loses then the other has to win. Why don't we just have a "Winner" indicator with a color/number (depending on how we choose the teams)? If we have teams red and blue, we can choose "R", "B", or "T" (for tie) or something like that. I can't mock it very well but I attached a crappy image:

slide1

Also, what is the bracket type in the mockup where we have two teams with byes and one winner for each match? Is that non-elimination?

I can start sketching out the functionality (generating rounds, pulling from the players in an event, etc.), but it would be nice to decide on the UI as well.

kevintxwu commented 10 years ago

I agree that this makes way more sense! However, instead of a drop-down what I would suggest would be to keep my original formatting and clicking on any "score" box will instead of allowing you to enter a W/L, open up an alert box rather than a drop-down. I'll release mockups as soon as I can to show you what I mean.

The bracket type is non-elimination! As you can see the same number of players are included in each round!

kevintxwu commented 10 years ago

Btw, sorry for replying so late! I've been on the struggle bus in my personal life lately so I haven't been on top of things :P

dwarrier commented 10 years ago

No need to apologize, Kevin! I hope that you're taking care of yourself. I'm always here if you want someone to talk to!

Thank you for the clarification, I'm not exactly sure what you mean with the score box but I'll try to get a backend framework up and running.

dwarrier commented 10 years ago

Whoops, one more thing- will this mean that there can only be one bye at most for each round?

dwarrier commented 10 years ago

Okay, here we go. I've been using a weird form system for brackets and so I have to change it to a nested model to get a single submit button.

It will take me longer to figure out the jquery dialogs, so I will be using radio buttons for now in the forms (for win, lose, and tie).

@kevintxwu I'll post questions here as I go along:

kevintxwu commented 10 years ago

We shouldn't move on from a series of rounds until a confirm or start button is clicked so we don't generate a bad set of matchups if they accidentally entered something wrong initially. After the next round is generated, previous rounds should be editable BUT changing a previous round should have no effect on current rounds. It should just be like a revision of previous win/loss. Think "oh we found out so and so cheated so were gonna turn his win to a loss, but we already started this round so it's ok that so and so is still playing his current opponent now."

dwarrier commented 10 years ago

Okay, that should be fine! I've made some progress- I think it'll be easier from here on out now that I've gotten the nested forms down.

The radio buttons are kind of ugly, so you may have to style them when I'm done. I'll try to make them a bit more appealing though.

Keep in mind this is a rough version, I'll be adding more buttons for each row and making the interface clearer. Also, ignore the win/loss styling for now!

screen shot 2014-07-26 at 6 02 20 pm

kevintxwu commented 10 years ago

Oooo this is really nice...but the issue is we have to support tie games as well? But I guess we can handle that after adding in jQuery UI. Maybe Howard and I can work towards some js solution that connects the dialog with the radio button.

dwarrier commented 10 years ago

Yup, for now tie games will have to be a little hacky (I put in a note at the top to make it a little clearer).

It's coming along! I changed to a 1v1 player setup and I can now generate rounds. Just a few more things to do and it'll be a usable prototype.

screen shot 2014-07-27 at 12 19 37 am

Whoops- the note doesn't show there, but it says "Check a box to declare a winner. Check both boxes or leave both blank to declare a tie."

I'll have to remember to set both boxes blank if there's a tie, there's a lot of little fixes like that left.

kevintxwu commented 10 years ago

Nice! Really good job Deeps. This is pretty sexy.

dwarrier commented 10 years ago

So I ran into a little problem. Nothing I can't figure out, but it needs to be solved before the system works perfectly.

I found that there are only a few full brackets where every player gets a chance to play every other player. It took me a long time to realize I couldn't just pair off players for each round as long as the positions in the round are filled. I'm writing an algorithm to find at least one of these matchups for the entire bracket, but until then I'm going to make some UI changes and push what I have. I didn't expect to run into something like this, and I want to get the basic functionality done.

@kevintxwu is there any chance you could implement the side scrolling after creating new rounds? I still have to fix a couple bugs and display scores.

kevintxwu commented 10 years ago

Yea I'll re-figure out a way to represent the whole bracket, since the current width make it have to side scroll. Players don't necessarily need to play every other player. What's most important is that the top players are matched with the top players and the bottom players are matched with the bottom players. In fact, in a typical event, there could only be only like three rounds for 8 players (meaning that far from all the players play each other).

dwarrier commented 10 years ago

Okay, I'll leave that for now then. I fixed enough to make it functional and pushed it.

I don't expect anyone to review all the changes, but it would be good if someone could glance over it when they have the time. There are a lot of things in there I'm not certain of!

I still have some changes to make here. I'll take care of rebasing with master when I make some touchups.