bga-cards
    Preparing search index...

    Interface DiscardDeckSettings<T>

    interface DiscardDeckSettings<T> {
        autoPlace?: (card: T) => boolean;
        cardClickEventFilter?: CardClickEventFilter;
        counter?: CardCounterSettings;
        lastPlayedCardStyle?: SelectionStyle;
        maxHorizontalShift?: number;
        maxRotation?: number;
        maxVerticalShift?: number;
        selectableCardStyle?: SelectionStyle;
        selectedCardStyle?: SelectionStyle;
        sort?: SortFunction<T>;
        unselectableCardStyle?: SelectionStyle;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    autoPlace?: (card: T) => boolean

    Say if a given card should be placed on this stock, based on card properties. For example, every card with location === 'hand' and location_arg == this.player_id should go to the current player hand. If unset, all cards on this stock must be added manually on this stock.

    Type declaration

      • (card: T): boolean
      • Parameters

        • card: T

          the card to place on a stock

        Returns boolean

        true if the card should be placed on this stock.

    cardClickEventFilter?: CardClickEventFilter

    The filter on card click event. Use setting from manager is unset.

    Show a card counter on the stock. Not visible if unset.

    lastPlayedCardStyle?: SelectionStyle

    The style to apply to the last played card. Default to class 'bga-cards_last-played-card'.

    maxHorizontalShift?: number

    Max horizontal shift from the center (in % of the card width). Default 5.

    maxRotation?: number

    Max rotation (in deg). Default 5.

    maxVerticalShift?: number

    Max vertical shift from the center (in % of the card height). Default 5.

    selectableCardStyle?: SelectionStyle

    The style to apply to selectable cards. Use style from manager is unset.

    selectedCardStyle?: SelectionStyle

    The style to apply to selected cards. Use style from manager is unset.

    sort?: SortFunction<T>

    Indicate the card sorting (unset means no sorting, new cards will be added at the end). For example, use sort: sortFunction('type', '-type_arg') to sort by type then type_arg (in reversed order if prefixed with -). Be sure you typed the values correctly! Else '11' will be before '2'.

    unselectableCardStyle?: SelectionStyle

    The style to apply to selectable cards. Use style from manager is unset.