String poolBaseName = jTextField1.getText()+java.io.File.separator;
try {
CardList list;
String deckName;
CardDeck deck;
for (int i = 0; i < PLAYER_COUNT; i++)
{
String deckBase = "1.Player";
if (i==1)
{
deckBase = "2.Player";
}
deckName = deckBase + " deck";
deck = new CardDeck(deckName, className, poolBaseName);
mDecks[i] = new CardList(deck.getCards());
deckName = deckBase + " library";
deck = new CardDeck(deckName, className, poolBaseName);
mLibrary[i] = new CardList(deck.getCards());
deckName = deckBase + " hand";
deck = new CardDeck(deckName, className, poolBaseName);
mHand[i] = new CardList(deck.getCards());
deckName = deckBase + " creature";
deck = new CardDeck(deckName, className, poolBaseName);
mBattlefield[i] = new CardList(deck.getCards());
deckName = deckBase + " land";
deck = new CardDeck(deckName, className, poolBaseName);
mLand[i] = new CardList(deck.getCards());
deckName = deckBase + " graveyard";
deck = new CardDeck(deckName, className, poolBaseName);
mGraveyard[i] = new CardList(deck.getCards());
deckName = deckBase + " discarded";
deck = new CardDeck(deckName, className, poolBaseName);
mDiscarded[i] = new CardList(deck.getCards());
}
}
catch (Throwable e)
{
return;
}
CardList list;
String deckName;
poolBaseName = jTextField2.getText()+java.io.File.separator;;
className = jTextField3.getText();
CardDeck deck;
for (int i = 0; i < PLAYER_COUNT; i++)
{
String deckBase = "1.Player";
if (i==1)
{
deckBase = "2.Player";
}
deckName = deckBase + " deck";
list = mDecks[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
deckName = deckBase + " library";
list = mLibrary[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
deckName = deckBase + " graveyard";
list = mGraveyard[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
deckName = deckBase + " hand";
list = mHand[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
deckName = deckBase + " creature";
list = mBattlefield[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
deckName = deckBase + " land";
list = mLand[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
deckName = deckBase + " discarded";
list = mDiscarded[i];
deck = new CardDeck(list, deckName, className, poolBaseName);
deck.save();
}
// reinit test defs
resetCombo();