package mechanique; /* MechaniQue, the programming language for Interactive Fiction Copyright (C) 2008 G.J.G.T. (Gabor) de Mooij This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (highest version applies !!). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ---MECHANIQUESOFT/GABOR DE MOOIJ */ import java.io.*; import java.util.*; import java.util.regex.*; import java.applet.*; import java.io.Serializable; import java.lang.Math; ; public class m2 { public static void main(String[] args) { ManagerFacade manager = new ManagerFacade(); System.out.println("MechaniQue/J, Copyright (C) 2008 Gabor de Mooij"); System.out.println("MechaniQue comes with ABSOLUTELY NO WARRANTY."); System.out.println("This is free software, and you are welcome to redistribute it"); System.out.println("under certain conditions. For more information please consult:"); System.out.println("http://www.gnu.org , the GNU website."); if (args.length>1) { if (args[0].equals("-c")) { String parser = ""; if (args.length > 2) parser = args[2]; manager.compileStory(args[1],parser); }else if (args[0].equals("-r")) { manager.runStory(args[1],false, new Terminal()); }else if (args[0].equals("-p")) { manager.runXBookStory(args[1],false, new Terminal()); } else if (args[0].equals("-sp")) { manager.runXBookStory(args[1],false, new SpeechDecorator(new Terminal())); }else if (args[0].equals("-s")) { manager.tellStory(args[1]); }else if (args[0].equals("-d")) { manager.runStory(args[1],true,new Terminal()); } else if (args[0].equals("-l")) { manager.continueStory(args[1]); } else if (args[0].equals("-o")) { String parser = ""; if (args.length > 2) parser = args[2]; manager.obfuscateStory(args[1],parser); }else { manager.showInfo(); } } else { manager.showInfo(); } } }