megamek.common.Compute.d6();
    public static void main(String[] args) {        String logFileName = "MegaMek.log";        for (int i = 0; i < args.length; i++) {            if (args[i].equals("-testdice")) {                testDice();                return;            }            else if (args[i].equals("-dedicated")) {                Settings.load();                new Server(Settings.lastServerPass, Settings.lastServerPort);                return;            }            else if (args[i].equals("-log")) {                // Next argument is the log file's name.                i++;                if ( i >= args.length || args[i].equals("none")                     || args[i].equals("off") ) {                    logFileName = null;                } else {                    logFileName = args[i];                }            }            else if ( args[i].equals("-testxml") ) {                // Next argument is the log file's name.                i++;                if ( i >= args.length ) {                    System.err.println( "The '-testxml' flag requires a file name." );                } else {                    new TinyXMLTest( "xml", args[i] );                }                return;            }        }        // Redirect output to logfiles, unless turned off.        if ( logFileName != null ) {            try {                System.out.println("Redirecting output to " + logFileName);                PrintStream ps = new PrintStream(new BufferedOutputStream(                                 new FileOutputStream(logFileName), 64));                System.setOut(ps);                System.setErr(ps);            } catch (Exception e) {                System.err.println("Unable to redirect output to " +                                   logFileName);                e.printStackTrace();            }        } // End log-to-file        // kick off a RNG check as quick as possible, since init can take a while        megamek.common.Compute.d6();        Settings.load();        new MegaMek();    }