Closed mcarroll316 closed 1 year ago
Closing this as I answered my own question. Put it in a loop. Duh.
Can you share the code for the loop been trying this also
@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)
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: @.***>
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']