static void Main(string[] args) { using (SimulationCore game = new SimulationCore()) { game.Run(); } }
public UIWindow(SimulationCore displayModule) { ElementHost.EnableModelessKeyboardInterop(this); InitializeComponent(); mutationButtonMapping = new Dictionary<Button, List<Mutation>>(); startConfigChoices = new Dictionary<ComboBoxItem, Type>(); IEnumerable<String> paramFileNames = Directory.EnumerateFiles("Content"); foreach (String f in paramFileNames) { if(System.IO.Path.GetExtension(f) == ".json"){ ComboBoxItem newItem = new ComboBoxItem(); newItem.Content = System.IO.Path.GetFileName(f); startConfigurationComboBox.Items.Add(newItem); } } finalCellNumberDataSource = new ObservableDataSource<Point>(); finalCellNumberDataSource.SetXYMapping(p => p); blastCellNumberDataSource = new ObservableDataSource<Point>(); blastCellNumberDataSource.SetXYMapping(p => p); cellCount.AddLineGraph(finalCellNumberDataSource, Colors.Green, 2, "final cells"); cellCount.AddLineGraph(blastCellNumberDataSource, Colors.Red, 2, "blast cells"); cellCount.LegendVisible = false; mutationCountDataSource = new ObservableDataSource<Point>(); mutationCountDataSource.SetXYMapping(p => p); mutationCount.AddLineGraph(mutationCountDataSource, Colors.Black, 2, "mutations"); mutationCount.LegendVisible = false; bloodVesselCountCountDataSource = new ObservableDataSource<Point>(); bloodVesselCountCountDataSource.SetXYMapping(p => p); bloodVesselCount.AddLineGraph(bloodVesselCountCountDataSource, Colors.Purple, 2, "blood vessels"); bloodVesselCount.LegendVisible = false; stopSimulationButton.IsEnabled = false; mutationCreationButton.IsEnabled = false; }
public SimulationCore() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; instance = this; }