@Cards-TS
    Preparing search index...

    Class / Enum representing the possible suits in a deck

    Index

    Properties

    name: string
    symbol: string
    type: "suit" = 'suit'
    CLUBS: Suit = ...
    DIAMONDS: Suit = ...
    HEARTS: Suit = ...
    NONE: Suit = ...

    Suit used only for jokers

    SPADES: Suit = ...
    suits: Suit[] = ...

    The normal suits that appear in the deck

    symbolic: boolean = false

    Whether to use the symbol version when printing or the letter version

    Accessors

    Methods

    • Look up a suit based on an object Since the order field is an internal representation, this is not guaranteed to be stable between versions

      Parameters

      • obj: any

        the object to convert from

      Returns Suit

      the corresponding suit

    • Look up the suit from the letter

      Parameters

      • str: string

        the string to create from (expects the letter names)

      Returns Suit

      the corresponding suit

      fromString('d')
      > Suit.DIAMONDS