CardPool API has been extended by including utility methods to gather specific statistics about a cardPool. These statistics include:
- Distribution (card count frequency) of the Card Edition included in the Pool
- Distribution of the Card Edition Type included in the Pool
- Retrieving the most common Card Edition Type among those included in the Pool
- Determine whether or not the Pool "isModern" (i.e. the majority of cards is gathered from Modern Sets)
- get the PivotCardEdition: this is the cornerstone of card art optimisation for decks
The PivotCardEdition is the edition that will be considered the threshold boundary for cards in the pool. Any decision of card arts for other cards will be considered based on the PivotEdition, that is "alternativeCardPrint" released BEFORE or AFTER (depending on the current Card Art Preference) the PIVOT EDITION RELEASE DATE.
Also, this commit includes an optimisation in add method implementation, getting rid of lots of duplicated code!
Methods related to Card Art Preference Settings, and for Card Art Smart Selection have been renamed with better wording.
Most importantly, StaticData now includes a new method to retrieve the number of art count for a given PaperCard, as well as a completely refactored and improved method for getAlternativeCardPrint.
In particular, the class now provides three different implementation of getAlternativeCardPrint, with the more sophisticated one also including normalisation wrt. the card frame, and whether or not the chosen alternative print should be gathered from an Expansion edition.
All these specialisation are part of the "Card Art Optimisation" algorithm included in Deck, and instructed by statistics gathered from Card Pool (next commit)
DeckChooser uses it's own `selectedDeckType` to get current selected deck type (instead of querying it from deckComboBox) to update forge perferences, accordingly.
All the NetDeckXX classes now traverse their corresponding download dir recursively to look for deck files to load.
So far, from what I can tell, this is only necessary to correctly (re)load Net Decks >> Pro Tour.
However, this opens up the possibility to enable Net Decks to be organised in subfolders that will still be loaded back into Forge.
Now the smart card art selection is also included in the set of checkings that are performed to see whether or not card arts in Pools require any update.
Deferred sections for deck are only used once, and just when the deck needs to be loaded. At that time, if any optimisation to card art is enabled (and required, that is "there are cards with no pre-specified edition").
After that, sections are memorised and later updated if anything needs updates, and the last used card art preference was different.