Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

https://spordle.atlassian.net/browse/SPR-88

Play currently integrates with a microservice maintained by Olivier and Richard that extracted logic from our legacy systems. It works great, but we want to build a more integrated experience into Play. This was initially avoided due to time constraints and wanting to avoid future footguns due to lack of analysis, so the current integration is designed to be easily abandoned and replaced.

To facilitate a sane migration, consider that brackets have the following components:

  • Seeding teams into and between series

    • Can be random to initialize or based on standings of a prior schedule or series

  • Advancing teams between games within a series

    • Winner/loser of a prior game

Notes

  • Can use the ScheduleTeam order to determine the initial seeding

  • Should integrate this into the new generate games flow

    • Add a new “Brackets” option after total games per team and single/double rotation

    • Additional step added for selecting the bracket options

    • DraftGames will need to be able to link with some version/equivalent of GameBracket. All dependent games must be published at once

Examples

PCAHA U13A Playoffs

PCAHA uses a combination of different brackets during playoffs, segmented by team tier.

All teams start in the 1st round as single elimination, top 8 teams advance to a 4-point series based on 1st round standings (6v8, 1v3, 5v7, 2v4), and top 4 teams advance to final 4, based on final four standings (1v4, 2v3), which determines the winner by a round robin format.

Final winner advances to BC Hockey’s Championships. All eliminated teams play in a presidents series using round robin.

  • Tier 1-4: 1st Round → 4-Point Series → Final 4

  • Presidents Series 1-10

image-20240203-234030.png

Requirements

  • Each series has it’s own standings within the same schedule (e.g., groups)

  • Need to be able to seed games based on standings in another group

    • Either manually or automatically based on maximum ranking

  • Must be able to have dependencies between games to advance teams within a series

Models

BracketTemplate

Available system templates that can be used

Currently handled by brackets service

Property

Type

Description

id

uuid

name

string

description

string

totalTeams

number

Total number of teams

type

enum

Single Elimination, Double Elimination, False Double Elimination, Triple Elimination

template

jsonb

Graph of dependent games that would produce GameBrackets and can be parsed for a bracket UI

Format TBD

GameDependency

Renamed from GameBracket. This model describes the dependencies for a game.

TODO: How to handle DraftGame? targetType/homeTargetType? DraftGameDependency?

Without this, brackets must be immediately published. All dependent draft games would need to be published at once.

Property

Type

Description

id

uuid

gameId

id

Game that will be affected by dependent games

bracketId
templateId

id

Bracket template

referenceId

id

Template reference

homeGameId

id

Dependent game for this game’s home team

homeResult

enum

Expected home team result of the dependent game

Winner, Loser

homeSeed

number

This references the ScheduleTeam order. Reseeding games will update the home team to be based on the ScheduleTeam with the same order

Cannot be used in combination with homeGameId/homeResult

homeLabel

string

Label to describe what the home team will be.

Will default to “Winner of game xyz” based on homeGameId/homeResult or “Team 1” based on homeSeed, so not necessary in most cases, except maybe to describe seeding from other schedules/groups

awayGameId

id

awayResult

enum

awayLabel

string

awaySeed

number

Implementation

  • V1

    • Select Teams can be used to seed a series

      • Need to fix the sort by schedule rank; this doesn’t seem to work

      • Confirm if groups are showing up and can be filtered and added into

    • Add a way to reseed teams into games after they’ve been generated

      • This would need to be a manual operation that’s available in the schedule menu to trigger the change.

      • Brackets service to start populating homeSeed/awaySeed so that Play is able to reseed games

    • Bracket service needs to account for team order and groupId

  • V2

    • Add BracketTemplate to replace the bracket service

    • Integrate GameDependency into admin and website to show dependent games clearly

    • Automatic rules to seed teams between series

  • No labels