Closed ensignlee closed 12 years ago
adding wager types are pretty involved. you may want to wait on this ticket until you are more experienced with the other tickets. But feel free to ask me if you have questions.
You have to add the ability to grade the wager type, add it to all the tables, also allow people to choose the wager type, and the UI on the enter bet screen, as well as the UI for the edit bet screen.
Hmm, I didn't realize that this was such a complicated ticket. Cameron, do you mind doing it then? I think I've had somewhere between 10-15 requests for this already.
What exactly is the difference between this bet type and the existing "total" bet type?
So a total bet is the number of total points scored by BOTH teams.
A Team total is only for one team. For instance, Houston Astros Team total over 3.5, St. Louis Cardinals Team Total over 4.5. whereas the game total would be over 8.
Make sense?
Gotcha. So in the bet history table, the "bet on" column would show something like "Astros Over", "Cardinals Under", etc?
That sounds good to me.
When users are entering in the bets, let's have it look like the following (you can see this yourself by going to "enter Bets", then selecting a game"):
First dropdown (bet type): They should select Team Total Second dropdown (bet choice): Astros Over, Astros Under, Cardinals Over, Cardinals Under Third text field: should say "Total" where the user can input a team total value. Ideally, this should autopopulate if you can get the information from the Pinnacle XML
Alternatively, we could have it display like this:
First dropdown (bet type): Choices are either "Astros TT" or "Cardinals TT" Second dropdown (bet choice): Over, Under Third text field: should say "Total" where the user can input a team total value. Ideally, this should autopopulate if you can get the information from the Pinnacle XML
I guess if I had a preference, I choose the 1st option in regards to UI for it. But if it's significantly harder, I'm fine with the 2nd. I'm not sure how Pinnacle's XML is structured nor how our DB is structured for that. Cameron - thoughts?
I think that we should stick with the first dropdown being the type, and the second one being the specific bet/side of the bet. So then it would be "Team Total" "Home Over, Home Under, Visitor Over, Visitor Under".
Is this for every sport type? I do not think that I have ever seen the team total in the pinnacle feed. Do they do them? Would it be in some special category? This is typically what I see from pinnacle
<period>
<period_number>0</period_number>
<period_description>Game</period_description>
<periodcutoff_datetimeGMT>2011-09-27 02:05</periodcutoff_datetimeGMT>
<period_status>I</period_status>
<period_update>open</period_update>
<spread_maximum>3000</spread_maximum>
<moneyline_maximum>5000</moneyline_maximum>
<total_maximum>2000</total_maximum>
<moneyline>
<moneyline_visiting>162</moneyline_visiting>
<moneyline_home>-173</moneyline_home>
</moneyline>
<spread>
<spread_visiting>1.5</spread_visiting>
<spread_adjust_visiting>-152</spread_adjust_visiting>
<spread_home>-1.5</spread_home>
<spread_adjust_home>140</spread_adjust_home>
</spread>
<total>
<total_points>6.5</total_points>
<over_adjust>100</over_adjust>
<under_adjust>-110</under_adjust>
</total>
</period>
Cameron, do you know if the data from the buildBet function in models/user_bet is actually used anywhere?
Also, what files/directories can I safely ignore? I assume vendors/shells/migrate.php isn't going to be used anymore, for example.
Yes, this is for every sport type. Um...if you don't see team totals in the XML, then I guess we can just leave it blank and let users enter in their own values. This would make things significantly easier for Chris as well, I'd assume.
This looks done to me, but there's likely something that I missed. Can you guys check it over and make sure that it works the way you expect it to?
I'll test it tonight and let you know if I find any bugs.
Looks good to me. Only change I have is to default odds to -110. Right now, the odds box is just getting the same value that it had previously from whatever bet choice was available.
Grading seems right, and the UI seems good. Great work Chris! btc sent your way.
I'm not sure why the odds value isn't adjusting. There's code in place to do it, but it doesn't seem to be working. Should I get started on debugging it, or would you rather have Cameron take a look first?
Cameron - mind taking a crack at it first?
@Chris the place that your code is inside if (odd) {} that means that it will only get to that code path if the odds are set.
@Edmund we really should create another ticket if you would like this behavior changed. Currently if no odds are set for a bet type on a game then it will set it to -110 iff the box with the odds in it is empty. This is to minimize someone typing in some odds then realizing that it is the wrong bet type changing it and having the odds change in the box. This also has the unfortunate circumstance that if the odds are auto populated then they will stay as well. We can add some logic to say only change the odds to -110 if the odds were auto populated and not edited by the user or something like that, but we may want to discuss that further. You can see it on the main site by finding some game with moneyline odds and then changing it to second half bet type, they usually do not have odds on them if the game has not started yet. Also, it interacts kind of weird with parlays since all of those do not have odds, but yet we want to be using/setting odds that already were populated.
After reading through the code, chris fixed all my concerns and I tested some parts myself and I am happy with it.
Chris if you are happy with everything please go ahead and close the ticket.
Edmund if you are happy with everything then we can go ahead and make it live just tell me.
Make it so.
We've had several requests for this. Basically, a team total is a bet on the amount of points a team will score. Over/Under x number of points.