static void Main(string[] args) { if(args.Length > 0 && args[0] == "autostart") { // Start simulation ArrayList races = World.GetAvailableRaces(); World world = new World(races,races.Count * Config.WorldInitialLifeletsPerRace,Config.WorldInitialSpawnMethod); Viewport viewport = new Viewport(world); System.Windows.Forms.Application.Run(viewport); } else { // Show startup screen System.Windows.Forms.Application.Run(new StartScreen()); } }
private void buttonSimulate_Click(object sender, EventArgs e) { // Compile list of races ArrayList races = new ArrayList(); foreach(Type type in _checkedListRaces.CheckedItems) races.Add(type); // Create world World world = new World(races,_trackbarInitialLifelets.Value,Config.WorldInitialSpawnMethod); // Create and show viewport Viewport viewport = new Viewport(world); viewport.Show(); }