mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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.util.*;
|
||||
|
||||
import forge.properties.ForgeConstants;
|
||||
import forge.util.storage.IStorage;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
@@ -176,8 +177,11 @@ public class SimulateMatch {
|
||||
|
||||
private static Deck deckFromCommandLineParameter(String deckname, GameType type) {
|
||||
int dotpos = deckname.lastIndexOf('.');
|
||||
if(dotpos > 0 && dotpos == deckname.length()-4)
|
||||
return DeckSerializer.fromFile(new File(deckname));
|
||||
if(dotpos > 0 && dotpos == deckname.length()-4) {
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user