GameManagerTests ResetGame Method Delta Engine Documentation

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

public void ResetGame()
Examples

[Test]
public void ResetGame()
{
    manager.gameOfLife.ReviveCellAtPosition(0, 0);
    manager.ResetGame();
    Assert.AreEqual(0, manager.gameOfLife.Population);
    Assert.AreEqual(0, manager.gameOfLife.Generation);
}
[Test]
public void ResetGameAlsoStopSimulationWhenCurrentlyRunning()
{
    SimulationRunsWithFourTickPerSecondWhenStarted();
    manager.ResetGame();
    Assert.IsFalse(manager.IsSimulationRunning);
}
See Also