forked from External/mage
Aded Random deck generation to Mage.Client start up dialog. Also now all cards on client can be fetched using CardsStorage.getAllCards() method.
This commit is contained in:
parent
791ce58b23
commit
2987d15b4e
10 changed files with 530 additions and 23 deletions
|
|
@ -0,0 +1,22 @@
|
|||
package mage.client.cards;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.sets.Sets;
|
||||
|
||||
public class CardsStorage {
|
||||
private static Set<Card> allCards = new LinkedHashSet<Card>();
|
||||
|
||||
static {
|
||||
for (ExpansionSet set: Sets.getInstance().values()) {
|
||||
allCards.addAll(set.createCards());
|
||||
}
|
||||
}
|
||||
|
||||
public static Set<Card> getAllCards() {
|
||||
return allCards;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue