mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-21 06:29:29 -05:00
* Renders groups * Bracket data refactoring * Starting bracket working (first bracket only) * TODOs + crash fix * Source bracket logic initial * Bracket progression (DE underground bracket) * Preview working for second bracket * Bracket nav initial * Check-in to bracket feature * Start Underground bracket * Team/teams pages tweaks to support underground bracket * Underground bracket finalization progress * Tournament class * id -> userId + more useOutletContext removed * Bracket loader refactored out * Migrate admin to useTournament * Bracket.settings * Slim tournament loader * Fix useEffect infinite loop * Adjust waiting for teams text * Refactor old tournament DB call from to admin * Admin action: check in/out from specific bracket * Standings work * Back button from match page -> correct bracket * Standings logic for DE grand finals * Standings + finalize bracket * Dev log * Unit tests utils etc. * Adjust TODOs * Fix round robin issues * Add RR tests * Round robin standings initial * Wins against tied + points tiebreaker progress * Fix losing state when switching between tabs * Add check-in indications to seeding page * Link to user page on seed tool * Submit points * Total points from bracket manager * findById gonezino * Ahead of time check-in * Couple todos * Reopen logic refactor * Tournament format settings * RR->SE placements, skipping underground bracket * Fix tournament team page round names * More teams to UG bracket if first round of DE only byes * Fix graphics bug * Fixes * Fix some E2E tests * Fix E2E tests
63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
/*---------------------------------------------------------------------------|
|
|
* Contains the rest of the types which doesn't belong to the other files.
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
import type { Result } from "./unions";
|
|
|
|
/**
|
|
* The possible status for a match.
|
|
*/
|
|
export enum Status {
|
|
/** The two matches leading to this one are not completed yet. */
|
|
Locked = 0,
|
|
|
|
/** One participant is ready and waiting for the other one. */
|
|
Waiting = 1,
|
|
|
|
/** Both participants are ready to start. */
|
|
Ready = 2,
|
|
|
|
/** The match is running. */
|
|
Running = 3,
|
|
|
|
/** The match is completed. */
|
|
Completed = 4,
|
|
}
|
|
|
|
/**
|
|
* The results of a participant in a match.
|
|
*/
|
|
export interface ParticipantResult {
|
|
/** If `null`, the participant is to be determined. */
|
|
id: number | null;
|
|
|
|
/** Indicates where the participant comes from. */
|
|
position?: number;
|
|
|
|
/** If this participant forfeits, the other automatically wins. */
|
|
forfeit?: boolean;
|
|
|
|
/** The current score of the participant. */
|
|
score?: number;
|
|
|
|
/** How many points in total participant scored in total this set. KO = 100 points. Getting KO'd = 0 points. */
|
|
totalPoints?: number;
|
|
|
|
/** Tells what is the result of a duel for this participant. */
|
|
result?: Result;
|
|
}
|
|
|
|
/**
|
|
* Only contains information about match status and results.
|
|
*/
|
|
export interface MatchResults {
|
|
/** Status of the match. */
|
|
status: Status;
|
|
|
|
/** First opponent of the match. */
|
|
opponent1: ParticipantResult | null;
|
|
|
|
/** Second opponent of the match. */
|
|
opponent2: ParticipantResult | null;
|
|
}
|