mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- When getting all formats of a deck, don't change the order of the formats but sticking it into an unordered set.
This commit is contained in:
@@ -35,13 +35,8 @@ import forge.util.storage.StorageBase;
|
||||
import forge.util.storage.StorageReaderFileSections;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class GameFormat implements Comparable<GameFormat> {
|
||||
@@ -73,7 +68,7 @@ public class GameFormat implements Comparable<GameFormat> {
|
||||
allowedSetCodes = sets == null ? new ArrayList<String>() : Lists.newArrayList(sets);
|
||||
bannedCardNames = bannedCards == null ? new ArrayList<String>() : Lists.newArrayList(bannedCards);
|
||||
restrictedCardNames = restrictedCards == null ? new ArrayList<String>() : Lists.newArrayList(restrictedCards);
|
||||
|
||||
|
||||
this.allowedSetCodes_ro = Collections.unmodifiableList(allowedSetCodes);
|
||||
this.bannedCardNames_ro = Collections.unmodifiableList(bannedCardNames);
|
||||
this.restrictedCardNames_ro = Collections.unmodifiableList(restrictedCardNames);
|
||||
@@ -273,7 +268,7 @@ public class GameFormat implements Comparable<GameFormat> {
|
||||
}
|
||||
|
||||
public Set<GameFormat> getAllFormatsOfDeck(Deck deck) {
|
||||
Set<GameFormat> result = new HashSet<GameFormat>();
|
||||
SortedSet<GameFormat> result = new TreeSet<GameFormat>();
|
||||
CardPool allCards = deck.getAllCardsInASinglePool();
|
||||
for(GameFormat gf : naturallyOrdered) {
|
||||
if (gf.isPoolLegal(allCards)) {
|
||||
|
||||
Reference in New Issue
Block a user