Table of Contents |
---|
...
Each branch (BQ) has it’s own rules
Suspensions do not apply across branches (BQ suspension does not apply in BA), but a Baseball Canada suspension (e.g., from nationals) can apply to all branches
Suspensions
All penalties (ejections) result in a 1 game suspension, then accumulate into 3 games, 5 games then indefinite
Suspensions accumulate by participant (any team, office within BQ)
No expiry time component or indefinite rules from game infractions
...
When the game is completed (or certified, depending on settings), get all parent rulebooks of the schedule office
Cancel out sanctions in parent rulebooks that have a matching sanction in a child rulebook by matchers
Determine matching sanction rule for each player
Each penalty only results in one suspension per game
Hockey has some exceptions
Determine sanction rules by matching the strictest penalty name/code match and order
TODO: indirect red will affect yellow here somehow 🚩
Get all past penalties and suspensions of all suspend-able players in the same season
In soccer, limit both to same office
Determine the sanction based on the accumulation rules
accumulations[] is ordered, find the matching total based on the number of penalties incurred in past games and current. Account for reset count.
If there is an expiry ratio defined, calculate the expiry based on the number of days
If the expiry falls within a break, extend it by the number of days within that break
When creating the suspension, send a notification to the player, team and offices
...