magefree / magefree/mage

Support non-numeric collector numbers with no digits

Open
#11,157 6 comments 0 reactions 1 assignee Claimed by @JayDi85 View on GitHub
enhancement refactoring
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

As recently noticed from #11145.

According to the Scryfall team, _"card numbers should be considered to be plaintext strings. they may contain multiple non-digit components, may contain no digits at all, and may not correspond to anything at all seen on the card"_.

Currently we have code that assumes card number contains digits that can be parsed to an integer. Specifically, `MageCardComparator` fails to sort as `Integer.parseInt()` throws a `NumberFormatException` which isn't handled, and this breaks the deck editor view.

Need to check for any other code that might need adjustment, perhaps `CardUtil.parseCardNumberAsInt()`, not sure if there are others.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.