Esempio n. 1
0
        public void CanVisualizeGrid()
        {
            var grid = new CellState[, ] {
                { CellState.Dead, CellState.Alive }, { CellState.Dead, CellState.Alive }
            };
            var expectedGrid = " X\n"
                               + " X\n";

            Assert.Equal(expectedGrid, ConsoleRenderer.GridAsString(grid));
        }
Esempio n. 2
0
        public void CanVisualizeCurrentCopyOfGrid()
        {
            var grid         = new World(4, 5, new HashSet <(int, int)>());
            var expectedGrid = "     \n"
                               + "     \n"
                               + "     \n"
                               + "     \n";

            Assert.Equal(expectedGrid, ConsoleRenderer.GridAsString(grid.CloneGrid()));
        }