import { ElementBase } from "./element-kit.ts"; /** * THE CLOTHS A TABLE MAY BE LAID IN: the same five the whole family offers, and itsutsu.com's boards. Each is the * felt's colour, its deep edge and the ink written on it. * * @example * ```ts * import { TABLE_CLOTHS } from "@johnmorrisdotca/toranpu/table"; * console.log(TABLE_CLOTHS); * ``` */ export declare const TABLE_CLOTHS: { readonly green: { readonly felt: "#2f5d4a"; readonly deep: "#1f4135"; readonly ink: "#f3efe4"; }; readonly blue: { readonly felt: "#2865a6"; readonly deep: "#1a4677"; readonly ink: "#f3efe4"; }; readonly red: { readonly felt: "#a3342e"; readonly deep: "#7a231f"; readonly ink: "#f3efe4"; }; readonly black: { readonly felt: "#2f3236"; readonly deep: "#1b1d20"; readonly ink: "#ece8dc"; }; readonly wood: { readonly felt: "#e2ba7a"; readonly deep: "#c4954f"; readonly ink: "#2b1d0e"; }; }; /** A cloth's name. * * @example * ```ts * import type { TableCloth } from "@johnmorrisdotca/toranpu/table"; * * const value: TableCloth = "green"; * console.log(value); * ``` */ export type TableCloth = keyof typeof TABLE_CLOTHS; /** * : ANY OF THE ELEVEN GAMES, READY TO PLAY. The seats round the felt, what lies on the table (the * trick, the pile to beat, the stock and the discard as ``), the hand of whoever is to play, the * moves they may make, and computers in every other seat, playing their turns after a short pause. * * * * Attributes: * game any of the twelve, by its key or in kebab case: hearts (unless said), spades, euchre, cribbage, * oh-hell, crazy-eights, go-fish, big-two, president, gin-rummy, war * players how many sit at the table, within the game's own range (its usual number unless said) * people how many of the seats are people's, the first ones; the rest are computers (1 unless said) * names the seats' names, separated by commas; the first is "You" unless said * seed the deal: the same seed deals the same cards (a new one each game unless said) * cloth the felt: green (unless said), blue, red, black or wood * messiness how untidy the stock and the discard lie, 0 to 1 (0.3 unless said) * delay how long a computer thinks before it plays, in milliseconds (550 unless said) * design, back, back-colour, back-image, back-logo, mark, size, width, lang, sound as on `` * * `deal()` deals again, with a new seed unless one is given; the `game` property is the game as it stands. * Each move is a `toranpu-table` event that bubbles, its detail `{ seat, move, over, winners }`. * * @example * ```ts no-run * import { ToranpuTable } from "@johnmorrisdotca/toranpu/table"; * import "@johnmorrisdotca/toranpu/table/define"; * const table = document.createElement("toranpu-table") as ToranpuTable; * table.setAttribute("game", "hearts"); * table.setAttribute("seed", "42"); * document.body.append(table); * console.log(table.game); * ``` */ export declare class ToranpuTable extends ElementBase { #private; static get observedAttributes(): readonly string[]; /** The game as it stands, as the game's own rules hold it. Setting it to a game's key (`"hearts"`, `"crazy-eights"`) sets the `game` attribute, which deals that game. */ get game(): unknown; set game(kind: unknown); /** Deal again: the same game and table, with `seed`, or a new seed. */ deal(seed?: number): void; connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(name: string, before: string | null, after: string | null): void; }