Closed ensignlee closed 13 years ago
If I'm understanding the bets controller code correctly, the calcGroupStats function needs to be modified to support more than one condition, since we want to display stats based only on spread bets. Any pointers on how I should approach this?
I would assume that the best way to do this actually would be to add some kind of filter to the calcGroupStats function. Right now everything is either win, loss or tie. If we are only concerned with wins losses and ties for spreads then we should have a test each time through the loop to see if it even something that we should pay attention to or not. Is that helpful?
That's sort of what I had assumed multiple conditions would entail, as per the comment "We only support 1 condition at this point". Should I add another argument to calcGroupStats for filter conditions, then?
yes, just adding another argument is fine.
Jeff brought this up in his feedback. I definitely see value in seeing how well you do given a certain spread.
For instance, my record when I'm laying 1-3 points vs 3.5 - 6 points, etc.
Let's have the breakdown go: 14+ 10 to 13.5 7 to 9.5 3.5 to 6.5 .5 to 3
-.5 to -3 -3.5 to -6.5 -7 to -9.5 -10 to -13.5 -14 +