feat : add games database

This commit is contained in:
GuillaumeSD
2024-02-22 00:26:07 +01:00
parent 4502651492
commit 2a74b62bae
16 changed files with 450 additions and 7 deletions

29
src/types/game.ts Normal file
View File

@@ -0,0 +1,29 @@
export interface MoveEval {
bestMove: string;
lines: LineEval[];
}
export interface LineEval {
pv: string[];
cp?: number;
mate?: number;
}
export interface GameEval {
moves: MoveEval[];
whiteAccuracy: number;
blackAccuracy: number;
}
export interface Game {
id: number;
pgn: string;
event?: string;
site?: string;
date?: string;
round?: string;
white?: string;
black?: string;
result?: string;
eval?: GameEval;
}