Example #1
0
        public void Run()
        {
            var width  = 80;
            var height = 80;

            var soup   = new Board(width, height);
            var engine = new DefaultEngine <WrappingMooreNeighborhood>();

            soup.Init(() => CellState.Dead, engine);

            soup.GliderAt(2, 10);
            soup.GliderAt(2, 30);
            soup.GliderAt(2, 50);
            soup.GliderAt(2, 70);

            soup.GliderAt(70, 5, true, false);
            soup.GliderAt(70, 25, true, false);
            soup.GliderAt(70, 55, true, false);
            soup.GliderAt(70, 65, true, false);

            soup.GliderAt(30, 30, false, false);
            soup.GliderAt(40, 40, false, false);
            soup.GliderAt(50, 50, false, false);
            soup.GliderAt(60, 60, false, false);

            soup.GliderAt(30, 60, false, true);
            soup.GliderAt(40, 50, false, true);
            soup.GliderAt(50, 40, false, true);
            soup.GliderAt(60, 30, false, true);

            var driver = new ConsoleGame();

            driver.InitConsole(width, height);
            driver.LightningBolt(soup);
        }
        public void Run()
        {
            var width  = 80;
            var height = 80;

            var soup = new Board(width, height);

            soup.Init(Board._RandomState, new DefaultestEngine());

            var driver = new ConsoleGame();

            driver.InitConsole(width, height);
            driver.LightningBolt(soup);
        }
Example #3
0
        public void Run()
        {
            var width  = 80;
            var height = 80;

            var soup = new Board(width, height);

            soup.Init(() => CellState.Dead, null);
            soup.Actors.Add(new LangtonAnt(new Coordinant(width / 2, height / 2), false));

            var driver = new ConsoleGame();

            driver.InitConsole(width, height);
            driver.LightningBolt(soup);
        }
Example #4
0
        public void Run()
        {
            var width  = 80;
            var height = 80;

            var soup   = new Board(width, height);
            var engine = new DefaultEngine <MooreNeighborhood>();

            soup.Init(() => CellState.Dead, engine);
            GosperGliderGun.GggAt(soup, 10, 10);
            var driver = new ConsoleGame();

            driver.InitConsole(width, height);
            driver.LightningBolt(soup);
        }
Example #5
0
        public void Run()
        {
            var width  = 80;
            var height = 80;

            var soup   = new Board(width, height);
            var engine = new DefaultEngine <NoDiag_N_VonNeuman <N_3> >();

            soup.Init(Board._RandomState, engine);

            //MortalCells
            var maxLife = 4;

            soup.BoardIterator((x, y) => soup.State[x, y] = new AbsoluteMortalCell(soup.State[x, y], maxLife));

            var driver = new ConsoleGame();

            driver.InitConsole(width, height);
            driver.LightningBolt(soup);
        }
Example #6
0
        public void Run()
        {
            var width  = 80;
            var height = 80;

            var soup = new Board(width, height);

            //var engine = new DefaultEngine<WrappingMooreNeighborhood>();
            soup.Init(() => CellState.Dead, null);
            soup.Actors.Add(new LangtonAnt(new Coordinant(width / 2, height / 2), true));
            //MortalCells
            var maxLife = 100;

            soup.BoardIterator((x, y) => soup.State[x, y] = new AbsoluteMortalCell(soup.State[x, y], maxLife));

            var driver = new ConsoleGame();

            driver.InitConsole(width, height);
            driver.LightningBolt(soup);
        }