mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Replacing GetFilteredPoolWithCount with GetFilteredPool
This commit is contained in:
@@ -296,7 +296,7 @@ public class Deck extends DeckBase implements Iterable<Entry<DeckSection, CardPo
|
|||||||
continue; // pool empty, no card has been found!
|
continue; // pool empty, no card has been found!
|
||||||
|
|
||||||
// Filter pool by applying DeckSection Validation schema for Card Types (to avoid inconsistencies)
|
// Filter pool by applying DeckSection Validation schema for Card Types (to avoid inconsistencies)
|
||||||
CardPool filteredPool = pool.getFilteredPoolWithCardsCount(new Predicate<PaperCard>() {
|
CardPool filteredPool = pool.getFilteredPool(new Predicate<PaperCard>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(PaperCard input) {
|
public boolean apply(PaperCard input) {
|
||||||
return deckSection.validate(input);
|
return deckSection.validate(input);
|
||||||
@@ -304,7 +304,7 @@ public class Deck extends DeckBase implements Iterable<Entry<DeckSection, CardPo
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (filteredPool.countDistinct() != pool.countDistinct()) { // Some cards have been filtered
|
if (filteredPool.countDistinct() != pool.countDistinct()) { // Some cards have been filtered
|
||||||
CardPool blackListPool = pool.getFilteredPoolWithCardsCount(new Predicate<PaperCard>() {
|
CardPool blackListPool = pool.getFilteredPool(new Predicate<PaperCard>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(PaperCard input) {
|
public boolean apply(PaperCard input) {
|
||||||
return !(deckSection.validate(input));
|
return !(deckSection.validate(input));
|
||||||
|
|||||||
Reference in New Issue
Block a user