restrict_opposing_positions-optimizer-method.Rd
Restrict Opposing Positions
# S4 method for optimizer
restrict_opposing_positions(object, pos1, pos2)
An optimizer object
Positions for set one
Positions for set two
Updated optimizer object
Prevents positions from opposing teams from being included in lineups.
if (FALSE) {
opt <- create_optimizer(site = 'DRAFTKINGS', sport = 'HOCKEY', contest_type = 'CLASSIC')
opt <- add_players_from_csv(object = opt, filepath = '/Path/to/file.csv')
# Restrict lineup from having Skaters and Goalies from opposite teams
opt <- restrict_opposing_positions(object = opt, pos1 = c('C','W','D'), pos2 = 'G')
}