DimaKudosh / pydfs-lineup-optimizer

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

lock_player - Request this be an array #393

Closed mcarroll316 closed 1 year ago

mcarroll316 commented 1 year ago

Requesting that locking of players be moved to an array as opposed to individual calls. I'm feeding a player pool in from my site and not sure I find a creative solution to accept more than one locked player when each one is its own method call.

From this... optimizer.player_pool.lock_player('Juan Soto') optimizer.player_pool.lock_player('Aaron Nola')

To this... optimizer.player_pool.lock_player['Juan Soto', 'Aaron Nola']

mcarroll316 commented 1 year ago

Closing this as I answered my own question. Put it in a loop. Duh.

Denwen12 commented 1 year ago

Can you share the code for the loop been trying this also

mcarroll316 commented 1 year ago

@Denwen12 - Here ya go. I spent hours over-thinking this. Lol.

lockedPlayers = ["Hunter Greene","Javier Baez","Jeimer Candelario"]

for lockedPlayer in lockedPlayers: optimizer.player_pool.lock_player(lockedPlayer)

Denwen12 commented 1 year ago

Lol

On Fri, Dec 9, 2022, 12:39 AM mcarroll316 @.***> wrote:

@Denwen12 https://github.com/Denwen12 - Here ya go. I spent hours over-thinking this. Lol.

lockedPlayers = ["Hunter Greene","Javier Baez","Jeimer Candelario"]

for lockedPlayer in lockedPlayers: optimizer.player_pool.lock_player(lockedPlayer)

— Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/393#issuecomment-1343876858, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7XNZEO4Z4IXYCRCPQ3WMLA2HANCNFSM6AAAAAASYY2WF4 . You are receiving this because you were mentioned.Message ID: @.***>