Skip to content

Conversation

JacobHearst
Copy link
Owner

Closes #28

@JacobHearst JacobHearst changed the title Unknown assoc value Store the value of unimplemented enum cases Feb 10, 2025
@JacobHearst
Copy link
Owner Author

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,
Copy link
Contributor

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)
Copy link
Contributor

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.

@missingems
Copy link
Contributor

It has been awhile, shall we get this merged

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.

Add raw value to unknown enum cases

2 participants