Created
August 30, 2011 02:34
-
-
Save marshall007/1180027 to your computer and use it in GitHub Desktop.
Loading the decks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void load() { | |
Configuration deckConfig = new Configuration(new File(plugin.dir + "decks.yml")); | |
deckConfig.load(); | |
LinkedList<Card> savedDeck = null; | |
int s, r; | |
LinkedList<String> deck = (LinkedList) deckConfig.getStringList("decks." + deckName, null); | |
for (int i=0; i<deck.size(); i++) { | |
String[] temp = deck.get(i).split("-"); | |
s = Integer.parseInt(temp[0]); | |
r = Integer.parseInt(temp[1]); | |
savedDeck.push(new Card(s, r)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment