export declare const FILE_NAMES: readonly ["a", "b", "c", "d", "e", "f", "g", "h", "i"]; export type FileName = (typeof FILE_NAMES)[number]; export declare const RANK_NAMES: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; export type RankName = (typeof RANK_NAMES)[number]; export type Square = number; export type SquareName = `${FileName}${RankName}`; /** * Indexable by square indices. */ export type BySquare = T[]; export declare const COLORS: readonly ["red", "black"]; export type Color = (typeof COLORS)[number]; /** * Indexable by `red` and `black`. */ export type ByColor = { [color in Color]: T; }; export declare const ROLES: readonly ["pawn", "cannon", "chariot", "horse", "elephant", "advisor", "king"]; export type Role = (typeof ROLES)[number]; /** * Indexable by `pawn`, `cannon`, `chariot`, `horse`, `elephant`, `advisor`, and `king`. */ export type ByRole = { [role in Role]: T; }; export interface Piece { role: Role; color: Color; } export interface Move { from: Square; to: Square; } export declare const RULES: readonly ["xiangqi"]; export type Rules = (typeof RULES)[number]; export interface Outcome { winner: Color | undefined; }