import * as cg from "chessgroundx/types"; export interface Step { fen: cg.FEN; move: string | undefined; check: boolean; turnColor: cg.Color; san?: string; analysis?: Ceval; ceval?: Ceval; scoreStr?: string; vari?: Step[]; sanSAN?: string; clocks?: { white: number; black: number; movetime: number; }; } export interface CrossTable { s1: number; s2: number; r: string[]; _id: string; } export interface MsgGameNotFound { gameId: string; } export interface MsgShutdown { message: string; } export interface MsgChat { room?: string; user: string; message: string; time?: number; } export interface MsgFullChat { lines: MsgChat[]; } export interface MsgBoard { gameId: string; fen: string; ply: number; lastMove: string; dests: { [orig: string]: cg.Key[]; }; promo: string[]; bikjang: boolean; check: boolean; by: string; status: number; pgn: string; uci_usi: string; result: string; steps: Step[]; berserk: { w: boolean; b: boolean; }; byo?: number[]; clocks?: Clocks; } export interface Ceval { d: number; m?: string; p?: string; s: { cp?: number; mate?: number; }; k?: number; } export interface MsgSpectators { spectators: string; } export interface MsgUserConnected { username: string; ply?: number; firstmovetime?: number; } export interface MsgGameEnd { status: number; result: string; gameId: string; pgn: string; ct: CrossTable; rdiffs: RDiffs; } export interface MsgNewGame { gameId: string; } export interface Clocks { white: number; black: number; } export interface RDiffs { brdiff: number; wrdiff: number; } export declare type MsgMove = { type: string; gameId: string; move: string; clocks: { movetime: number; white: number; black: number; }; ply: number; };