Beispiel #1
0
        public void RunScenario(string path)
        {
            // path to scenario file ignored

            landscape = landscapeFactory.CreateLandscape(Ecoregions.CreateGrid());

            ecoregions = landscape.NewSiteVar <int>();
            foreach (ActiveSite site in landscape)
            {
                ecoregions[site] = Ecoregions.Codes[site.Location.Row - 1, site.Location.Column - 1];
            }
            ecoregions.InactiveSiteValues = -1;

            // Instantiate the main class of the example extension, passing
            //   the core to it.
            ExtensionMain extensionMain = new ExtensionMain(this);

            // Run the extension.
            extensionMain.Run();
        }
Beispiel #2
0
        //---------------------------------------------------------------------

        private void Run(ExtensionMain extension)
        {
            ui.WriteLine("Running {0} ...", extension.Name);
            extension.Run();
        }