Esempio n. 1
0
 private void FillGameWithBoards(SavedBoard board, Game game) {
     for (var i = 0; i < 1000; i++) {
         game.Boards.Add(new SavedBoard {
             AliveCells = board.AliveCells,
             Layout = board.Layout,
             Generation = board.Generation
         });
     }
 }
Esempio n. 2
0
        private void ShowBoardLayout(SavedBoard game) {
            Console.Clear();
            for (var yAxis = 0; yAxis <= game.Layout.Length - 1; yAxis++) {
                for (var xAxis = 0; xAxis <= game.Layout[0].Length - 1; xAxis++) {
                    Console.Write(game.Layout[yAxis][xAxis]);
                }

                Console.WriteLine();
            }
        }
Esempio n. 3
0
 public void ShowBoardStats(SavedBoard board) {
     Console.Write("Alive cells: {0}", board.AliveCells);
     Console.WriteLine("  Generation: {0}", board.Generation);
     Console.WriteLine();
 }
Esempio n. 4
0
 public void ShowBoard(SavedBoard game) {
     ShowBoardLayout(game);
     text.ShowBoardStats(game);
 }