Closed Scottw1105 closed 2 years ago
Why not just lock the player in with optimizer.player_pool.get_player_by_name or with a PlayersGroup(optimizer.player_pool.get_players I believe you can use them together as well but why complicate it
You could also set LeBron's position in your CSV/JSON to PF instead of SF/PF/F depending on the site. So he would only be considered for the PF position.
Why not just lock the player in with optimizer.player_pool.get_player_by_name or with a PlayersGroup(optimizer.player_pool.get_players I believe you can use them together as well but why complicate it
So the reason I need a player locked to a specific position is for late swap. So yes, you can late swap to an "optimal" lineup but I do a lot to my potential lineups after that. So I'd like to have 150 lineups of LeBron @ PF with other pieces around that to determine which lineup I'm going to play.
You could also set LeBron's position in your CSV/JSON to PF instead of SF/PF/F depending on the site. So he would only be considered for the PF position.
That's a fantastic idea, I'm sure that'll do exactly what I need it to do, thanks so much!
Haha I'm silly, it's built right into the .lock_player class.
optimizer.player_pool.lock_player('Zach Collins', 'C') works like a charm.
Just curious if there's a way to lock a specific player to a specific position?
Ex: LeBron James @ PF only.