DimaKudosh / pydfs-lineup-optimizer

Daily Fantasy Sports lineup optimzer for all popular daily fantasy sports sites
MIT License
424 stars 157 forks source link

MLB Stacks #362

Closed Milkman9691 closed 1 year ago

Milkman9691 commented 2 years ago

@DimaKudosh how would one go about creating stacks depending upon slate size? Depending on game slates I am trying to create anywhere from a 2/2/2 with Pitcher stack to a 4/4 stack without Pitcher. Short slates stacks are simple just TeamStack=4-5 players (<5 games). When it comes to the >7 game slates it gets a bit more complicated in how many players and what stack split to utilize. Any help on this would be greatly appreciated

norraist commented 2 years ago

You can do something like this if you're running Python 3.10:


match slatesize:
        case 3:
#stack defined here

        case (10|13|14|15):
# stack defined here

        case _:
#default stack defined here