Esempio n. 1
0
        private static void Main()
        {
            const int rows = 15;
            const int cols = 25;

            //var grid = new Grid<Cell>(Cell.Populate(rows, cols));
            var grid = new ResizingGrid <Cell>(Cell.PopulateRandomly(rows, cols));

            while (!Console.KeyAvailable)
            {
                Output(grid);

                grid.LifeObjects = grid.NextGeneration();

                Task.Delay(500).Wait();
            }

            Console.WriteLine("Done!");
        }