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:
magenoxx 2010-11-30 16:16:54 +00:00
parent 791ce58b23
commit 2987d15b4e
10 changed files with 530 additions and 23 deletions

View file

@ -0,0 +1,23 @@
package mage.client.util;
import java.io.File;
public class FileUtils {
public static File getTempDir(String key) {
String tmpDir = System.getProperty("java.io.tmpdir");
String sep = System.getProperty("file.separator");
if (!tmpDir.endsWith(sep))
tmpDir += sep;
tmpDir += key + "-" + java.util.UUID.randomUUID().toString();
File dir = new File(tmpDir);
if (!dir.mkdirs()) {
throw new RuntimeException("couldn't create temp directory " + tmpDir);
}
return dir;
}
}