GameOfLife Population Property Delta Engine Documentation

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

public int Population { get; }

Property Value

Type: Int32
Remarks

Tests: GameOfLife.Tests.GameOfLifeTests
Examples

2 unit tests call GameOfLife.GameOfLife.Population
[Test, CloseAfterFirstFrame]
public void NewCreatedGridShouldHaveJustDeadCells()
{
    Assert.AreEqual(0, gameOfLife.Population);
}
[Test, CloseAfterFirstFrame]
public void ResetGameState()
{
    ReviveAllCells();
    gameOfLife.SimulateNextGeneration();
    gameOfLife.ResetGameState();
    Assert.AreEqual(0, gameOfLife.Population);
    Assert.AreEqual(0, gameOfLife.Generation);
}
See Also