GameOfLife ToString Method Delta Engine Documentation

Namespace: GameOfLife
Assembly: GameOfLife (in GameOfLife.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public override string ToString()

Return Value

Type: String
Remarks

Tests: GameOfLife.Tests.GameOfLifeTests
Examples

1 unit tests call GameOfLife.GameOfLife.ToString
        [Test]
        public void GridToString()
        {
            var cellsToVisualize = new[,]
            { { 2, 0 }, { 1, 1 }, { 3, 1 }, { 0, 2 }, { 2, 2 }, { 4, 2 }, { 2, 3 }, { 2, 4 } };
            gameOfLife.BatchReviveCells(cellsToVisualize);
            const string ExpectedVisualGrid = @"--#--
-#-#-
#-#-#
--#--
--#--";
            Assert.AreEqual(ExpectedVisualGrid, gameOfLife.ToString());
        }
    }
See Also