@hanabi-live/game
    Preparing search index...

    Interface CardState

    interface CardState {
        dealtToStartingHand: boolean;
        firstCluedWhileOnChop: null | boolean;
        hasClueApplied: boolean;
        inDoubleDiscard: boolean;
        isKnownTrashFromEmpathy: boolean;
        isMisplayed: boolean;
        location: PlayerIndex | "deck" | "discard" | "playStack";
        numPositiveClues: number;
        order: CardOrder;
        positiveColorClues: Color[];
        positiveRankClues: (1 | 2 | 3 | 4 | 5)[];
        possibleCards: readonly SuitRankTuple[];
        possibleCardsForEmpathy: readonly SuitRankTuple[];
        possibleCardsFromClues: readonly SuitRankTuple[];
        rank: null | 7 | 3 | 1 | 2 | 4 | 5;
        rankDetermined: boolean;
        revealedToPlayer: readonly boolean[];
        segmentDiscarded: null | number;
        segmentDrawn: null | number;
        segmentFirstClued: null | number;
        segmentPlayed: null | number;
        suitDetermined: boolean;
        suitIndex: null | 0 | 3 | 1 | 2 | 4 | 5;
    }
    Index

    Properties

    dealtToStartingHand: boolean

    Needed for special sound effects.

    firstCluedWhileOnChop: null | boolean

    Needed for special sound effects.

    hasClueApplied: boolean
    inDoubleDiscard: boolean

    Whether the card is potentially in DDA. Since DDA status depends on the card's location and empathy rather than just the identity of the card, it is tracked as a sub-property of CardState, not CardStatus.

    isKnownTrashFromEmpathy: boolean

    Track whether the card is known-trash from empathy alone.

    isMisplayed: boolean

    Needed so that we can animate a misplayed card different from a discarded card.

    location: PlayerIndex | "deck" | "discard" | "playStack"
    numPositiveClues: number
    order: CardOrder
    positiveColorClues: Color[]

    We need this to highlight pips (e.g. in pink variants).

    The elements of this array will always be unique.

    positiveRankClues: (1 | 2 | 3 | 4 | 5)[]

    We need this to highlight pips (e.g. in pink variants).

    The elements of this array will always be unique.

    possibleCards: readonly SuitRankTuple[]

    A one-dimensional array of tuples. It contains a tuple for each specific card that is still possible based on everything we know so far. Do not access this by the index; filter the array to find the remaining cards that you need.

    possibleCardsForEmpathy: readonly SuitRankTuple[]

    A one-dimensional array of tuples. It contains a tuple for each specific card that is still possible based on everything the player holding it should know so far. Do not access this by the index; filter the array to find the remaining cards that you need.

    possibleCardsFromClues: readonly SuitRankTuple[]

    A one-dimensional array of tuples. It contains a tuple for each specific card that is still possible based on the clues touching the card so far. Do not access this by the index; filter the array to find the remaining cards that you need.

    rank: null | 7 | 3 | 1 | 2 | 4 | 5
    rankDetermined: boolean
    revealedToPlayer: readonly boolean[]

    An array that specifies whether the card is revealed to a particular player index.

    segmentDiscarded: null | number
    segmentDrawn: null | number
    segmentFirstClued: null | number
    segmentPlayed: null | number
    suitDetermined: boolean
    suitIndex: null | 0 | 3 | 1 | 2 | 4 | 5