CardCodetype
A card as ONE character, A–Z then a–z (cardCode): a whole deck is a
fifty-two-character string, so a deal travels in a saved game, an address
and a move list without any separator to parse.
Import it
import type { CardCode } from "@johnmorrisdotca/toranpu/deck";
Definition
type CardCode = string;
Examples
import type { CardCode } from "@johnmorrisdotca/toranpu/deck";
import { cardCode } from "@johnmorrisdotca/toranpu/deck";
const value: CardCode = cardCode({ suit: "spades", rank: 1 });
console.log(value);AWhat it prints (run when this page was built)