Exemplo n.º 1
0
        protected override void Initialize(Infrastructure.Configuration configuration)
        {
            base.Initialize(configuration);
            configuration.OnChange += UpdateConfiguration;
            UpdateConfiguration();

            current = new Generation <CellWorld> {
                Live = GetTestMap()
            };
            //current = new Generation<CellWorld> { Live = GetTestInitialLargeMap() };
            game.Initialize(current);
        }
Exemplo n.º 2
0
        private void LoadPattern()
        {
            if (lstPatterns.SelectedItem == null)
            {
                return;
            }
            var sr    = ((FileInfo)lstPatterns.SelectedItem).OpenText();
            var world = CellWorld.FromRLE(sr);

            StopGame();
            _game.Initialize(new Generation <CellWorld>
            {
                Live = world
            });
            StartGame();
        }