Improved performance of checking deck format legality

This commit is contained in:
austinio7116
2018-04-15 06:39:56 +01:00
committed by maustin
parent 17fc231db6
commit c05a3c64ee

View File

@@ -482,11 +482,11 @@ public class GameFormat implements Comparable<GameFormat> {
//exclude Digital formats from lists for now
continue;
}
if (gf.getFormatType().equals(FormatType.Historic) && coveredTypes.contains(gf.getFormatSubType())){
//exclude duplicate formats - only keep first of e.g. Standard historical
continue;
}
if (gf.isPoolLegal(allCards)) {
if (gf.getFormatType().equals(FormatType.Historic) && coveredTypes.contains(gf.getFormatSubType())){
//exclude duplicate formats - only keep first of e.g. Standard historical
continue;
}
result.add(gf);
coveredTypes.add(gf.getFormatSubType());
}