feat: bots

This commit is contained in:
Lala, Shahd
2026-06-10 09:31:27 +00:00
parent a2d2c00afe
commit fa27f2c23b
5 changed files with 149 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
export interface Bot {
id: string;
name: string;
rating: number;
createdAt: string;
}
export interface BotWithToken extends Bot {
token: string;
}
+66
View File
@@ -0,0 +1,66 @@
export interface BotRef {
id: string;
name: string;
}
export interface Clock {
limit: number;
increment: number;
}
export interface Variant {
key: string;
name: string;
}
export interface ResultDto {
rank: number;
points: number;
tieBreak: number;
bot: BotRef;
nbGames: number;
wins: number;
draws: number;
losses: number;
}
export interface Standing {
page: number;
players: ResultDto[];
}
export interface Tournament {
id: string;
fullName: string;
clock: Clock;
variant: Variant;
rated: boolean;
nbPlayers: number;
nbRounds: number;
createdBy: string;
startsAt: string | null;
status: string;
round: number;
standing: Standing;
winner: BotRef | null;
}
export interface TournamentList {
created: Tournament[];
started: Tournament[];
finished: Tournament[];
}
export interface Pairing {
id: string;
round: number;
white: BotRef | null;
black: BotRef;
gameId: string | null;
winner: string | null;
}
export interface RoundPairings {
round: number;
pairings: Pairing[];
}