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

Refactor MultiResultCard to remove implicit state #194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thiagovscoelho
Copy link

This changes the design of the MultiResultCard class to make state more explicit, as was requested in a "TODO" comment. It does this by adding the CardResult class to encapsulate the relevant state of a card evaluation in a single object.

The eval method now creates CardResult objects and adds them to a list of results instead of tuples, and it checks for the presence of card_result objects in results using the __eq__ method defined in the CardResult class.

The format_output method now takes a list of CardResult objects instead of tuples, and uses the card_result object's attributes to generate the formatted output.

Changed the git clone URL from git:// to https:// to resolve connection issues during the build process.
- Introduce a new CardResult class to encapsulate card evaluation results
- Modify MultiResultCard's eval method to use CardResult instances
- Update MultiResultCard's format_output method to handle CardResult instances
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

Successfully merging this pull request may close these issues.

1 participant