Closed jkomoros closed 7 years ago
Actually, I think this is as simple as boardgame-card-stack stamping each card with card-type= "card-{{deckName}})". (Verify that it works OK if the given card-type given doesn't point to a legitimate dom-module)
The problem is that the card that's stamped doesn't know the stack's metadata.
Another option is that stacks themselves just stamp cards and you tell us if they should propose-move or rotate (instead of adding those on the stacks themselves), and then we can set the card-type ourselves because we stamp and you don't, and we know the stack deckName at stamping time.
... nah, that won't work because in some cases the index needs to be passed as a propose-move arg.
The best option is simply to have _expandStack in state-manager just copy the deckName from the stack to each of the items as well.
For example:
Theoretically the information is encoded in the stack's object in state to key off of deckName.
Related to #418