export type PieceColor = "white" | "black";
export type PieceType = "pawn" | "rook" | "knight" | "bishop" | "queen" | "king";

export interface Piece {
    type: PieceType;
    color: PieceColor;
}

export interface ChessState {
    board: (Piece | null)[][];
    currentTurn: PieceColor;
    players: { white: string; black: string };
    moveHistory: string[];
    status: "playing" | "checkmate" | "stalemate" | "forfeit";
    winner: string | null;
}

export type ChessAction =
    | { type: "move"; from: [number, number]; to: [number, number] }
    | { type: "forfeit" };
