export type PieceType = "p" | "n" | "b" | "r" | "q" | "k"; export type SetId = "kingdom" | "forest" | "gothic" | "minimal"; export interface PieceSet { id: SetId; name: string; traditional: boolean; glyphs: Record; } // One fixed glyph per piece type, so a pawn always reads as a pawn. const SETS: Record = { kingdom: { id: "kingdom", name: "Kingdom", traditional: false, glyphs: { k: "🤴", q: "👸", b: "🧙", n: "🏇", r: "🏰", p: "🧑" }, }, forest: { id: "forest", name: "Forest", traditional: false, glyphs: { k: "🦁", q: "🦊", b: "🦉", n: "🦌", r: "🌳", p: "🐿️" }, }, gothic: { id: "gothic", name: "Gothic", traditional: false, glyphs: { k: "🧛", q: "🧛‍♀️", b: "🧙‍♂️", n: "🐺", r: "🏰", p: "🧟" }, }, minimal: { id: "minimal", name: "Minimal", traditional: true, // Color comes from the .w / .b classes, not the glyph. glyphs: { k: "♚", q: "♛", b: "♝", n: "♞", r: "♜", p: "♟" }, }, }; export const PIECE_SETS = Object.values(SETS); export function getSet(id: SetId): PieceSet { return SETS[id] ?? SETS.kingdom; }