The huge improvement is due to a re-use of a getAllCards(Name, Predicate) method I started implementing into another branch for DeckImporter - re-using this method internally resolves a **lot** of duplicated iterations, and checks, which made the whole method to run even faster than the original legacy implementation!
An extra test method has been added to verify the corner case of querying for a card from editions with a very high (and weird) artIndex (like a land) - making sure that exact card is finally returned!
New method in Interface API to get all cards in a given setCode.
This has changed the implementation of getArtCount avoiding to iterate over all the possible card prints.
This optimisation removes redundant queries when looking for cards by specificed Art Preference.
getCardsFromSet has been worked-around, avoiding querying for potential candidates already in memory.
A preliminary benchmark/tests is implemented too.
The loadDeck overloading support passing in a boolean flag to check whether current deck (if any) should be erased or not.
This will be useful when importing cards with deck importer without clearing current deck.
First round of improvements to deck import now including the current game type in the title - and so keep track of current deck format.
This will be particularly relevant for the improved DeckRecognizer which incorporates a new validation mechanism for on-the-fly card validation.
Now Deck Importer also include a very thorough set of instructions as welcome message (still WIP - to be updated and refined!)
Last but not least, there is automatic option to Import cards, or to Replace current deck (if any)
Forge loads all files found on the setlookup folder.
Example J21.txt (J21 set code) contains a list of set codes (sorted from Newest to Oldest beforehand) to lookup for images on other sets.
getUnique previously returned random results, based on the internal order in which entries were found.
Now, filtering by Unique Cards in Catalog is aware of the current Cart Art Preference
Also, the algorithm takes into account the case in which card image is missing.
In that case, the method tries to fill in the gaps with those alternatives having images. If not possible, the original entries are returned.
DeckChooser uses it's own `selectedDeckType` to get current selected deck type (instead of querying it from deckComboBox) to update forge perferences, accordingly.