Determines whether (the majority of the) cards in the Pool are modern framed (that is, cards are from Modern Card Edition). @return True if the majority of cards in Pool are from Modern Edition, false otherwise. If the count of Modern and PreModern cards is tied, the return value is determined by t
()
| 293 | * by the preferred Card Art Preference settings, namely True if Latest Art, False otherwise. |
| 294 | */ |
| 295 | public boolean isModern() { |
| 296 | int modernEditionsCount = 0; |
| 297 | int preModernEditionsCount = 0; |
| 298 | Map<CardEdition, Integer> editionStats = this.getCardEditionStatistics(false); |
| 299 | for (Map.Entry<CardEdition, Integer> entry: editionStats.entrySet()) { |
| 300 | CardEdition edition = entry.getKey(); |
| 301 | if (edition.isModern()) |
| 302 | modernEditionsCount += entry.getValue(); |
| 303 | else |
| 304 | preModernEditionsCount += entry.getValue(); |
| 305 | } |
| 306 | if (modernEditionsCount == preModernEditionsCount) |
| 307 | return StaticData.instance().cardArtPreferenceIsLatest(); |
| 308 | return modernEditionsCount > preModernEditionsCount; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * Determines the Pivot Edition for cards in the Pool. |
no test coverage detected