95eff42dfe
Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de> Co-authored-by: shahdlala66 <shahd.lala66@gmail.com> Reviewed-on: #8
67 lines
1.2 KiB
TypeScript
67 lines
1.2 KiB
TypeScript
export interface TournamentClock {
|
|
limit: number;
|
|
increment: number;
|
|
}
|
|
|
|
export interface TournamentVariant {
|
|
key: string;
|
|
name: string;
|
|
}
|
|
|
|
export interface TournamentBotRef {
|
|
id: string;
|
|
name: string;
|
|
}
|
|
|
|
export interface TournamentResult {
|
|
rank: number;
|
|
points: number;
|
|
tieBreak: number;
|
|
bot: TournamentBotRef;
|
|
nbGames: number;
|
|
wins: number;
|
|
draws: number;
|
|
losses: number;
|
|
}
|
|
|
|
export interface TournamentStanding {
|
|
page: number;
|
|
players: TournamentResult[];
|
|
}
|
|
|
|
export interface Tournament {
|
|
id: string;
|
|
fullName: string;
|
|
clock: TournamentClock;
|
|
variant: TournamentVariant;
|
|
rated: boolean;
|
|
nbPlayers: number;
|
|
nbRounds: number;
|
|
createdBy: string;
|
|
startsAt: string | null;
|
|
status: 'created' | 'started' | 'finished';
|
|
round: number;
|
|
standing: TournamentStanding;
|
|
winner: TournamentBotRef | null;
|
|
}
|
|
|
|
export interface TournamentList {
|
|
created: Tournament[];
|
|
started: Tournament[];
|
|
finished: Tournament[];
|
|
}
|
|
|
|
export interface TournamentPairing {
|
|
id: string;
|
|
round: number;
|
|
white: TournamentBotRef | null;
|
|
black: TournamentBotRef;
|
|
gameId: string | null;
|
|
winner: 'white' | 'black' | 'draw' | null;
|
|
}
|
|
|
|
export interface RoundPairings {
|
|
round: number;
|
|
pairings: TournamentPairing[];
|
|
}
|