feat: bots
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export interface Bot {
|
||||
id: string;
|
||||
name: string;
|
||||
rating: number;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface BotWithToken extends Bot {
|
||||
token: string;
|
||||
}
|
||||
@@ -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[];
|
||||
}
|
||||
Reference in New Issue
Block a user