Namespace: GameOfLife
Assembly: GameOfLife (in GameOfLife.exe) Version: 1.1.1.0 (1.1.1)
Tests: GameOfLife.Tests.GameOfLifeTests
2 unit tests call GameOfLife.GameOfLife.Generation
Assembly: GameOfLife (in GameOfLife.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Int32Remarks
Examples
[Test, CloseAfterFirstFrame] public void RunningSimulationIncrementsGenerationByOne() { Assert.AreEqual(0, gameOfLife.Generation); gameOfLife.SimulateNextGeneration(); Assert.AreEqual(1, gameOfLife.Generation); }
[Test, CloseAfterFirstFrame] public void ResetGameState() { ReviveAllCells(); gameOfLife.SimulateNextGeneration(); gameOfLife.ResetGameState(); Assert.AreEqual(0, gameOfLife.Population); Assert.AreEqual(0, gameOfLife.Generation); }
See Also