GameManager IsSimulationRunning Property Delta Engine Documentation

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

public bool IsSimulationRunning { get; }

Property Value

Type: Boolean
Remarks

Tests: GameOfLife.Tests.GameManagerTests
Examples

3 unit tests call GameOfLife.GameManager.IsSimulationRunning
[Test]
public void SimulationRunsWithFourTickPerSecondWhenStarted()
{
    manager.StartOrStopSimulation();
    Assert.IsTrue(manager.IsSimulationRunning);
    manager.Update();
    AdvanceTimeAndUpdateEntities(1);
    Assert.GreaterOrEqual(manager.gameOfLife.Generation, 4);
}
[Test]
public void StopSimulation()
{
    SimulationRunsWithFourTickPerSecondWhenStarted();
    manager.StartOrStopSimulation();
    Assert.IsFalse(manager.IsSimulationRunning);
}
[Test]
public void ResetGameAlsoStopSimulationWhenCurrentlyRunning()
{
    SimulationRunsWithFourTickPerSecondWhenStarted();
    manager.ResetGame();
    Assert.IsFalse(manager.IsSimulationRunning);
}
See Also