GameOfDeath ClassDelta Engine Documentation
Good old Game of Life, which will be the basis of multiplying rabbits in this game View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    GameOfDeath GameOfDeath
      GameOfDeath RabbitGrid

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

public class GameOfDeath : Entity, 
	Updateable

The GameOfDeath type exposes the following members.

Constructors

  NameDescription
Public methodGameOfDeath
Initializes a new instance of the GameOfDeath class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity.)
Public methodAddTag (Inherited from Entity.)
Protected methodBaseUpdate
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Entity.)
Public methodGet T 
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D) View code on GitHub
(Inherited from Entity.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Public methodGetNumberOfNeighbours
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodRandomize
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodSet (Inherited from Entity.)
Public methodSetComponents (Inherited from Entity.)
Public methodShouldSurvive
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToString (Inherited from Entity.)
Public methodUpdate
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Public fieldCurrentWorld
Public fieldheight
Public fieldNextGeneration
Public fieldwidth
Top
Properties

  NameDescription
Public propertyGenerationCount
Public propertyIsActive (Inherited from Entity.)
Public propertyIsPauseable (Overrides Entity IsPauseable.)
Public propertyItem
Public propertyMatrixSize
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyUpdatePriority (Inherited from Entity.)
Top
Remarks

Tests: GameOfDeath.Tests.GameOfDeathTests
Examples

12 unit tests call GameOfDeath.GameOfDeath
[Test]
public void CreateSimplestGameOfLifeEverWith1X1()
{
    game = new GameOfDeath(1, 1);
    Assert.AreEqual(0, game.GenerationCount);
    game.Update();
    Assert.AreEqual(1, game.GenerationCount);
}
[Test]
public void CreateInvalidGameOfLife()
{
    Assert.Throws<GameOfDeath.SizeMustBeGreaterThanZero>(() => new GameOfDeath(0, 0));
}
[Test]
public void OneCellShouldDisappearAfterOneIteration()
{
    game = new GameOfDeath(3, 3);
    game[1, 1] = true;
    game.Update();
    Assert.IsFalse(game[1, 1]);
}
See Also