Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: modify the decks structure separating cards #1143

Open
kodawah opened this issue Oct 19, 2023 · 0 comments
Open

proposal: modify the decks structure separating cards #1143

kodawah opened this issue Oct 19, 2023 · 0 comments
Labels
Enhancement New feature or request

Comments

@kodawah
Copy link
Contributor

kodawah commented Oct 19, 2023

Right now the set.Decks structure is composed of a few main elements (among which sealedProductUuids, name, and code) and three (or four if we count bonus) array of cards all on the same level

I think the structure could be optimized a bit to separate the main deck properties from the list of cards themselves, as in

    "code": "C20",
    "name": "Commander 2020 Deck Whatever",
    "cards": {
        "mainboard": [
            {
                Count/IsFoil/UUID
            },
            ....
        ]
        "sideboard": [
            {
                Count/IsFoil/UUID
            },
            ....
        ]
    }

In this way third party users can unmarshal cards in a dictionary and map, and just update the list of key present instead of hardcoding a new field. This also has the advantage of removing unused fields in case sideboard or other elements are empty

what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants