mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Match Simulator can more easily access subfolders
This commit is contained in:
@@ -3,6 +3,7 @@ package forge.view;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import forge.properties.ForgeConstants;
|
||||||
import forge.util.storage.IStorage;
|
import forge.util.storage.IStorage;
|
||||||
import org.apache.commons.lang3.text.WordUtils;
|
import org.apache.commons.lang3.text.WordUtils;
|
||||||
import org.apache.commons.lang3.time.StopWatch;
|
import org.apache.commons.lang3.time.StopWatch;
|
||||||
@@ -176,8 +177,11 @@ public class SimulateMatch {
|
|||||||
|
|
||||||
private static Deck deckFromCommandLineParameter(String deckname, GameType type) {
|
private static Deck deckFromCommandLineParameter(String deckname, GameType type) {
|
||||||
int dotpos = deckname.lastIndexOf('.');
|
int dotpos = deckname.lastIndexOf('.');
|
||||||
if(dotpos > 0 && dotpos == deckname.length()-4)
|
if(dotpos > 0 && dotpos == deckname.length()-4) {
|
||||||
return DeckSerializer.fromFile(new File(deckname));
|
String baseDir = type.equals(GameType.Commander) ?
|
||||||
|
ForgeConstants.DECK_COMMANDER_DIR : ForgeConstants.DECK_CONSTRUCTED_DIR;
|
||||||
|
return DeckSerializer.fromFile(new File(baseDir+deckname));
|
||||||
|
}
|
||||||
|
|
||||||
IStorage<Deck> deckStore = null;
|
IStorage<Deck> deckStore = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user