OptionalautoThe settings when using placeCard(s) to automatically place some cards in the matching stock
OptionalcardIndicate the width of a card border radius (example : '10px', '50%').
OptionalcardThe filter on card click event. Default 'selectable'.
Indicate the height of a card (in px).
Indicate the width of a card (in px).
OptionalfakeA generator of fake cards, to generate decks top card automatically. Default is generating an empty card, with only id set.
OptionalgetReturn the card rotation.
Use getCardRotation from settings if set, else will return 0
OptionalgetDefine the id that will be set to each card div. It must return a unique id for each different card, so it's often linked to card id.
Default: the id will be set to card.id.
OptionalisA function to determine if the card should show front side or back side, based on the informations of the card object.
If you only manage visible cards, set it to () => true.
Default is card.type is truthy.
OptionallastThe style to apply to the last played card. Default to class 'bga-cards_last-played-card'.
OptionalselectableThe style to apply to selectable cards. Default to class 'bga-cards_selectable-card'.
OptionalselectableThe style to apply to selectable slots. Default to class 'bga-cards_selectable-slot'.
OptionalselectedThe style to apply to selected cards. Use style from manager is unset. Default to class 'bga-cards_selected-card'.
OptionalselectedThe style to apply to selected slots. Default to class 'bga-cards_selected-slot'.
OptionalsetupAllow to populate the back div of the card. You can set classes or dataset to show the correct card face. You can also add some translated text on the card at this moment.
OptionalsetupAllow to populate the main div of the card. You can set classes or dataset, if it's informations shared by both sides.
the card informations
the card main Div element. You can add a class (to set width/height), change dataset, ... based on the card informations. There should be no visual informations on it, as it will be set on front/back Divs.
the id for a card
OptionalsetupAllow to populate the front div of the card. You can set classes or dataset to show the correct card face. You can also add some translated text on the card at this moment.
OptionaltypeThe type of cards, if you game has multiple cards types (each card manager should have a different type).
Default ${yourgamename}-card.
The card element will have this type as a class, and each side will have the class ${type}-${'front'/'back'}.
OptionalunselectableThe style to apply to selectable cards. Use style from manager is unset. Default to class 'bga-cards_unselectable-card'.
OptionalunselectableThe style to apply to selectable slots. Default to class 'bga-cards_unselectable-slot'.
The animation manager used in the game.