Better bracket logic
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# backend/app/core/structures.py
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
|
||||
from ..constants import BracketTypes
|
||||
|
||||
|
||||
@dataclass
|
||||
class Match:
|
||||
id: int
|
||||
bracket_type: BracketTypes
|
||||
round_number: int
|
||||
next_win: Optional["Match"] = None
|
||||
next_loss: Optional["Match"] = None
|
||||
next_win_slot: int = 0
|
||||
next_loss_slot: int = 0
|
||||
teams: list[Optional[int]] = field(default_factory=lambda: [None, None])
|
||||
is_bye: bool = False
|
||||
ghost_count: int = 0
|
||||
Reference in New Issue
Block a user