-
Notifications
You must be signed in to change notification settings - Fork 4
Store the value of unimplemented enum cases #31
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
base: main
Are you sure you want to change the base?
Conversation
|
Waiting for #30 to merge |
|
|
||
| /// All known Magic: the Gathering frame effects | ||
| public static let allCases: [Card.FrameEffect] = [ | ||
| .legendary, .miracle, .nyxtouched, .draft, .devoid, .tombstone, .colorshifted, .inverted, .sunmoondfc, .compasslanddfc, .originpwdfc, .mooneldrazidfc, .waxingandwaningmoondfc, .showcase, .extendedart, .companion, .etched, .snow, .lesson, .convertdfc, .fandfc, .battle, .gravestone, .fullart, .vehicle, .borderless, .extended, .spree, .textless, .enchantment, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also take the opportunity to make these cases camelCase to align with all the other enums we have?
| case .lesson: Card.FrameEffect.allCases.contains(.lesson) | ||
| case .convertdfc: Card.FrameEffect.allCases.contains(.convertdfc) | ||
| case .fandfc: Card.FrameEffect.allCases.contains(.fandfc) | ||
| case .battle: Card.FrameEffect.allCases.contains(.battle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand this test correctly, I think only .battle will be tested?, might want to use fall through to make sure all cases are covered.
|
It has been awhile, shall we get this merged |
|
Just found your library and love it, but strict enforcement of the enumerations is unfortunate. This is a great solution and would love to see it. Anything I can do to help it get over the line? A case that I don't believe is handled in this PR is the |
Closes #28