Exemplo n.º 1
0
        private static void Main()
        {
            const int simulationWorldWidth  = 500;
            const int simulationWorldHeight = 500;

            var simulator = new Simulator(simulationWorldWidth, simulationWorldHeight, TimeSpan.FromSeconds(1));


            using (var game = new DarwinatorRenderer(simulator))
            {
                using (var infosForm = new GetEvolution(simulator, game))
                {
                    infosForm.Show();
                    game.Run();
                }
            }
        }
Exemplo n.º 2
0
        public GetEvolution(Simulator simulator, DarwinatorRenderer darwinatorRenderer)
        {
            InitializeComponent();
            _simulator              = simulator;
            _simulator.DataRefresh += _simulator_DataRefresh;

            _darwinatorRenderer = darwinatorRenderer;

            flagDebug.Checked     = _darwinatorRenderer.DebugMode;
            flagRendering.Checked = _darwinatorRenderer.Rendering;
            flagPause.Checked     = _darwinatorRenderer.Paused;

            BestHerbivoreEvolution   = new Dictionary <string, ChartValues <ObservableValue> >();
            BestCarnivorousEvolution = new Dictionary <string, ChartValues <ObservableValue> >();

            chartHerbivoreEvolution.Series   = GetEmptySeries(BestHerbivoreEvolution);
            chartCarnivorousEvolution.Series = GetEmptySeries(BestCarnivorousEvolution);
        }