예제 #1
0
파일: Main.cs 프로젝트: mcl4r3k/gameoflive
        public static void Main()
        {
            Connways test      = new Connways();
            Board    gameboard = new Board(20, 20);

            int[,] currentboard = gameboard.FillGameboard();
            int[,] nextgenboard = new int[20, 20];


            for (int generation = 0; generation <= 10; generation++)
            {
                gameboard.OutputBoard(currentboard);
                currentboard = test.connwaysRules(currentboard, nextgenboard);

                gameboard.OutputBoard(currentboard);
                Thread.Sleep(1000);
                Console.Clear();
            }
        }
예제 #2
0
        public static void Main()
        {
            int generation = Convert.ToInt32(Console.ReadLine());
            int boardsize  = Convert.ToInt32(Console.ReadLine());

            Connways test      = new Connways();
            Board    gameboard = new Board(boardsize, boardsize);

            int[,] currentboard = gameboard.FillGameboard();
            int[,] nextgenboard = new int[boardsize, boardsize];


            for (int s = 0; s <= generation; s++)
            {
                gameboard.OutputBoard(currentboard);
                Thread.Sleep(1000);
                Console.Clear();
                currentboard = test.connwaysRules(currentboard, nextgenboard);
            }
        }