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

Add choice for specific field #5

Open
ImplyingICheck opened this issue May 10, 2023 · 0 comments
Open

Add choice for specific field #5

ImplyingICheck opened this issue May 10, 2023 · 0 comments

Comments

@ImplyingICheck
Copy link
Owner

[#1]
Add the ability to construct a card from indicated fields. This should lower memory and computation overhead.

Currently, I can think of two ways to do this:

  • Specify which fields to parse/construct in the initial call for Card class
  • Add a Filter object. This class should interface with Card to limit construction to wanted fields. Additionally, it should interface with higher level container classes like Decks.

[ankideckconstructor] card.py (Lines 32-36)


  def __generate_field_dict(field_names, fields):
    field_dict = {}
    for idx in range(len(field_names)):
      field_dict[field_names[idx]] = fields[idx]
    return field_dict

Open in IDE · Open on GitHub

Created from JetBrains using CodeStream

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

No branches or pull requests

1 participant