mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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 forge.util.storage.StorageReaderFileSections;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
|
|
||||||
public class GameFormat implements Comparable<GameFormat> {
|
public class GameFormat implements Comparable<GameFormat> {
|
||||||
@@ -273,7 +268,7 @@ public class GameFormat implements Comparable<GameFormat> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<GameFormat> getAllFormatsOfDeck(Deck deck) {
|
public Set<GameFormat> getAllFormatsOfDeck(Deck deck) {
|
||||||
Set<GameFormat> result = new HashSet<GameFormat>();
|
SortedSet<GameFormat> result = new TreeSet<GameFormat>();
|
||||||
CardPool allCards = deck.getAllCardsInASinglePool();
|
CardPool allCards = deck.getAllCardsInASinglePool();
|
||||||
for(GameFormat gf : naturallyOrdered) {
|
for(GameFormat gf : naturallyOrdered) {
|
||||||
if (gf.isPoolLegal(allCards)) {
|
if (gf.isPoolLegal(allCards)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user