Skip to content

Commit

Permalink
Merge pull request #217 from BenBrostoff/mlb-classic-c-or-1
Browse files Browse the repository at this point in the history
WIP: Allow C/1B mix
  • Loading branch information
BenBrostoff authored Jan 29, 2024
2 parents f2671e4 + 246d40e commit a95d4b0
Show file tree
Hide file tree
Showing 5 changed files with 1,077 additions and 2 deletions.
3 changes: 2 additions & 1 deletion draftfast/constants/positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
],
"MLB": [
["P", 1, 1],
["1B", 1, 2], # TODO - allow C or 1B
["C", 0, 1],
["1B", 0, 1],
["2B", 1, 2],
["3B", 1, 2],
["SS", 1, 2],
Expand Down
7 changes: 7 additions & 0 deletions draftfast/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,14 @@ def __eq__(self, other):
roster_size=ROSTER_SIZE_BY_SITE_BY_SPORT[FAN_DUEL]["MLB"],
salary_max=SALARY_CAP_BY_SITE_BY_LEAGUE[FAN_DUEL]["MLB"],
position_limits=POSITIONS_BY_SITE_BY_LEAGUE[FAN_DUEL]["MLB"],
min_teams=3,
general_position_limits=[],

# "Up to five players from same team, provided one is a pitcher."
# Rules below take 5 and subtract the pitcher to end up in same place.
# Ref:
# https://support.fanduel.com/s/article/How-many-players-can-I-select-from-one-team
position_per_team_rules=[[lambda pos: "P" not in pos, 4]],
)

DK_SOCCER_RULE_SET = RuleSet(
Expand Down
Loading

0 comments on commit a95d4b0

Please sign in to comment.