Cell IsAlive Property Delta Engine Documentation

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

public bool IsAlive { get; }

Property Value

Type: Boolean
Remarks

Tests: GameOfLife.Tests.CellTests
Examples

3 unit tests call GameOfLife.Cell.IsAlive
[Test, CloseAfterFirstFrame]
public void CellIsAliveAfterCallingRevice()
{
    cell.Revive();
    Assert.IsTrue(cell.IsAlive);
}
[Test, CloseAfterFirstFrame]
public void CellIsDeadAfterCallingKill()
{
    cell.Revive();
    cell.Kill();
    Assert.IsFalse(cell.IsAlive);
}
[Test, CloseAfterFirstFrame]
public void NewCellIsDeadAndHasTransparentWhiteColor()
{
    Assert.IsFalse(cell.IsAlive);
    Assert.AreEqual(Color.TransparentWhite, cell.Color);
}
See Also