Restrict Opposing Positions

# S4 method for optimizer
restrict_opposing_positions(object, pos1, pos2)

Arguments

object

An optimizer object

pos1

Positions for set one

pos2

Positions for set two

Value

Updated optimizer object

Details

Prevents positions from opposing teams from being included in lineups.

Examples

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')
}