public static void Main(String[] args) { Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); Debug.WriteLine("Main() {"); Debug.Indent(); try { var cfg = new Config(); var ext = new Extractor(); var stp = new Setuper(cfg); var exp = new Exporter(cfg); stp.ImportText(); stp.SetFeaturedItems(); stp.SetFeaturedEquips(); stp.SetFeaturedRecipes(); stp.SetCharacters(); stp.SetClassification(); stp.SetIcons(); stp.SetMats(); stp.SetQualityTypes(); stp.SetEnhanceTypes(); stp.SetEquips(); stp.SetEquipParts(); stp.SetBaseEquips(); stp.SetSets(); stp.SetEnchants(); stp.SetScreenshots(); var ssr = new Screenshoter(cfg); ssr.Screenshot(); exp.ExportIcons(); exp.ExportClassification(); exp.ExportCharacters(); exp.ExportMats(); exp.ExportQualityTypes(); exp.ExportEnhanceTypes(); exp.ExportEnchants(); exp.ExportScreenshots(); exp.ExportEquips(); exp.ExportEquipParts(); exp.ExportSets(); exp.ExportSitemap(); //MissingMaterials(cfg); //Color(cfg); } catch (Exception exception) { Debug.WriteLine(exception.Source); Debug.WriteLine(exception.Message); Debug.WriteLine(exception.StackTrace); throw; } finally { Debug.Unindent(); Debug.WriteLine("}"); Console.ReadKey(true); } }
static void Main(string[] args) { Map map = new Map(); map.LoadFromFile(@"testmap.txt"); Player player = new Player(10) { Position = new Vector2(5, 4) }; Utilites u = new Utilites(); Utilites.u.CurrentMap = map; Utilites.u.Collisions.Add('#'); Renderer mapRenderer = new Renderer(); Renderer.AddChar(player); Renderer.AddChar(new Door(new Vector2(11, 6)) { KeyId = 1 }); Renderer.AddChar(new FakeWall(new Vector2(16, 13), 1)); Renderer.AddChar(new Leaver(new Vector2(12, 11), 1)); Renderer.AddChar(new Enemy('B', "Bandit", 4, 5) { Position = new Vector2(5, 10), Drop = new Gold(10), CurrentWeapon = new Weapon("", 4) }); Renderer.AddChar(new ItemConteiner(new Vector2(6, 4), new Weapon("Wooden Clab", 2))); Renderer.AddChar(new ItemConteiner(new Vector2(7, 13), new Weapon("Iron Sword", 3))); Renderer.AddChar(new ItemConteiner(new Vector2(5, 5), new Armor("ChainMail", 2))); Renderer.AddChar(new ItemConteiner(new Vector2(25, 14), new Gold(5))); Renderer.AddChar(new ItemConteiner(new Vector2(4, 2), new Key(1))); Renderer.AddChar(new ItemConteiner(new Vector2(2, 14), new Consumable("Mead", 2))); Renderer.Render(); Renderer.WriteStats(); Setuper.TestWrite(); //Setuper.Setup(); Controller.ControlPlayer(); }
/// <summary> /// Sets up the runner before performing a test case /// </summary> public void Setup() { Util.DontNotify(() => { // Clears all caches FinderRepository.INSTANCE.ClearCache(); EfsSystem.Instance.ClearFunctionCache(); // Setup the execution environment Setuper setuper = new Setuper(); ExecutionTimeInitializer executionTimeInitializer = new ExecutionTimeInitializer(); foreach (Dictionary dictionary in EfsSystem.Instance.Dictionaries) { setuper.visit(dictionary); executionTimeInitializer.visit(dictionary); } // Setup the step if (SubSequence != null) { Expression expression = SubSequence.Frame.CycleDuration; IValue value = expression.GetExpressionValue(new InterpretationContext(SubSequence.Frame), null); Step = Functions.Function.GetDoubleValue(value); } PleaseWait = false; }); }
/// <summary> /// Sets up the runner before performing a test case /// </summary> public void Setup() { try { Generated.ControllersManager.NamableController.DesactivateNotification(); // Setup the execution environment Setuper setuper = new Setuper(EFSSystem); foreach (DataDictionary.Dictionary dictionary in EFSSystem.Dictionaries) { setuper.visit(dictionary); } // Clears all caches Utils.FinderRepository.INSTANCE.ClearCache(); // Builds the list of functions that will require a cache for their graph FunctionCacheCleaner = new FunctionGraphCache(EFSSystem); // Setup the step Expression expression = EFSSystem.Parser.Expression(SubSequence.Frame, SubSequence.Frame.getCycleDuration()); Values.IValue value = expression.GetValue(new InterpretationContext(SubSequence.Frame)); Step = Functions.Function.getDoubleValue(value); } finally { Generated.ControllersManager.NamableController.ActivateNotification(); } }